-
Notifications
You must be signed in to change notification settings - Fork 85
36 lines (36 loc) · 1017 Bytes
/
update-data.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 }}