-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.12 KB
/
update_zig_nightly.yml
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
37
38
name: Update Zig Nightly Cask
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
jobs:
update_zig_nightly:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Fetch Latest Zig Nightly Version
run: |
bash .github/workflows/scripts/update_zig_nightly.sh
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
if ! git diff --ignore-all-space --ignore-blank-lines --quiet; then
git add Casks/[email protected]
git commit -m "Workflow update_zig_nightly: Updated Zig Nightly Cask to version $(grep 'version ".*"' | cut -d '"' -f2)"
git push
else
echo "No changes detected."
fi