.github/workflows: add a dev queue for GitHub Actions hacking
diff --git a/.github/workflows/queue-dev.yml b/.github/workflows/queue-dev.yml
new file mode 100644
index 0000000..a9a1b54
--- /dev/null
+++ b/.github/workflows/queue-dev.yml
@@ -0,0 +1,53 @@
+# This is a copy of queue-main.yml, but with a different branch pattern.
+# It does not push the result anywhere; it logs instead.
+# It is meant for people changing how the commit queue works:
+# You can hack on the workflows, push to queue-dev-$USER, and iterate.
+# Please keep this file in sync with queue-main.yml.
+
+name: Dev Commit Queue
+on:
+ push:
+ branches:
+ - "queue-dev-*"
+
+permissions: read-all
+
+jobs:
+ formatting:
+ uses: ./.github/workflows/formatting.yml
+ permissions:
+ contents: write
+ with:
+ auto_fix: true
+
+ go-test:
+ needs: [formatting]
+ uses: ./.github/workflows/go_test.yml
+ permissions: read-all
+
+ ui-test:
+ needs: [formatting]
+ uses: ./.github/workflows/webui_test.yml
+ permissions: read-all
+
+ push-to-main:
+ runs-on: ubuntu-latest
+ needs: [go-test, ui-test, formatting]
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Push to main
+ run: |
+ COMMIT_TO_PUSH="HEAD"
+ if [[ "${{ needs.formatting.outputs.commit_sha }}" != "" ]]; then
+ echo "Using formatted commit: ${{ needs.formatting.outputs.commit_sha }}"
+ COMMIT_TO_PUSH="${{ needs.formatting.outputs.commit_sha }}"
+ fi
+
+ echo "Would push to main: ${COMMIT_TO_PUSH}"
+ env:
+ GITHUB_TOKEN: ${{ github.token }}