-
Notifications
You must be signed in to change notification settings - Fork 9
33 lines (31 loc) · 980 Bytes
/
update.yml
File metadata and controls
33 lines (31 loc) · 980 Bytes
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
name: Update latest versions
on:
workflow_dispatch:
repository_dispatch:
types: [update]
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: rake sync
- name: commit and push
id: commit
run: |
git config user.name "GitHub Actions Bot"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
if git diff --cached --quiet; then
echo "updated=false" >> "$GITHUB_OUTPUT"
else
git commit -m "rake sync"
git push
echo "updated=true" >> "$GITHUB_OUTPUT"
fi
env:
GITHUB_TOKEN: ${{ secrets.MATZBOT_AUTO_UPDATE_TOKEN }}
- name: dispatch build
if: steps.commit.outputs.updated == 'true'
run: gh workflow run build.yml
env:
GH_TOKEN: ${{ secrets.MATZBOT_AUTO_UPDATE_TOKEN }}