From 9247f49d8e5a0a35f5cf52f2e34ebf66f524cfcd Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Tue, 21 Nov 2023 22:59:02 +0100 Subject: [PATCH] automatic Zig update GH actions workflow --- .github/workflows/zig_update.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/zig_update.yaml diff --git a/.github/workflows/zig_update.yaml b/.github/workflows/zig_update.yaml new file mode 100644 index 00000000..d4e49861 --- /dev/null +++ b/.github/workflows/zig_update.yaml @@ -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." + }