Skip to content

Commit

Permalink
automatic Zig update GH actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aherrmann committed Nov 21, 2023
1 parent c8a3921 commit 9247f49
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/zig_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Zig Update

on:
schedule:
- cron: 0 0 * * 1
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update
run: |
bazel run //util:update_zig_versions
[ -z "$(git status --porcelain=v1 zig/private/versions.bzl 2>/dev/null)" ] || {
NEW_VERSION="$(grep -m 1 -oP '^\s+"\K\d+\.\d+\.\d+(?=":)' zig/private/versions.bzl)"
git add zig/private/versions.bzl
git commit -m 'update Zig versions'
gh pr create \
--title "chore: update Zig versions up to $NEW_VERSION" \
--body "- [ ] Manually update references to the latest Zig version."
}

0 comments on commit 9247f49

Please sign in to comment.