Update Java release data #4632
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Java release data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 */8 * * *' | |
jobs: | |
update: | |
if: github.repository == 'halcyon/asdf-java' | |
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 "[email protected]" | |
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 }} |