2020-04-26 22:23:58 +08:00
|
|
|
name: Update Java release data
|
|
|
|
on:
|
2020-07-28 21:10:27 +08:00
|
|
|
workflow_dispatch:
|
2020-04-26 22:23:58 +08:00
|
|
|
schedule:
|
|
|
|
- cron: '30 */8 * * *'
|
|
|
|
jobs:
|
|
|
|
update:
|
2021-04-06 23:54:36 +08:00
|
|
|
if: github.repository == 'halcyon/asdf-java'
|
2020-04-26 22:23:58 +08:00
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: mstksg/get-package@v1
|
|
|
|
with:
|
|
|
|
apt-get: curl
|
|
|
|
- name: Install jq 1.6
|
|
|
|
run: |
|
|
|
|
curl -Lo jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
|
|
|
|
chmod +x jq
|
|
|
|
jq --version
|
|
|
|
- name: Run update script
|
|
|
|
env:
|
|
|
|
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
export PATH=".:$PATH"
|
|
|
|
./update_data.bash
|
|
|
|
- name: Commit files
|
|
|
|
run: |
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
git add data/*.tsv
|
|
|
|
git clean -f
|
|
|
|
git commit -m "Update Java release data" || true
|
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|