blob: c86cd871038a6e2f842eb272f928abceb1146365 [file] [log] [blame]
Earl Lee2e463fb2025-04-17 11:22:22 -07001# Simplified Commit Queue
2#
3# (Force) push to "queue-main-$USER" a potential change, and
4# this job will push it main if it passes pre-commit and tests,
5# which will run in parallel. The push may fail if the commit
6# cannot be pushed cleanly because it needs to be rebased, which
7# will happen especially if another developer pushes a change at
8# roughly the same time.
9
10name: Main Branch Commit Queue
11on:
12 push:
13 branches:
Josh Bleecher Snyderbd6c1682025-04-25 12:04:07 -070014 - "queue-main-*"
Earl Lee2e463fb2025-04-17 11:22:22 -070015
16permissions: read-all
17
18jobs:
Josh Bleecher Snyderbd6c1682025-04-25 12:04:07 -070019 formatting:
20 uses: ./.github/workflows/formatting.yml
21 permissions: read-all
22 with:
23 auto_fix: true
24
Philip Zeyliger4de80d22025-04-23 12:33:31 -070025 go-test:
Josh Bleecher Snyderbd6c1682025-04-25 12:04:07 -070026 needs: [formatting]
Earl Lee2e463fb2025-04-17 11:22:22 -070027 uses: ./.github/workflows/go_test.yml
28 permissions: read-all
29
Philip Zeyliger4de80d22025-04-23 12:33:31 -070030 ui-test:
Josh Bleecher Snyderbd6c1682025-04-25 12:04:07 -070031 needs: [formatting]
Philip Zeyliger4de80d22025-04-23 12:33:31 -070032 uses: ./.github/workflows/webui_test.yml
33 permissions: read-all
34
Earl Lee2e463fb2025-04-17 11:22:22 -070035 push-to-main:
36 runs-on: ubuntu-latest
Josh Bleecher Snyderbd6c1682025-04-25 12:04:07 -070037 needs: [go-test, ui-test]
Earl Lee2e463fb2025-04-17 11:22:22 -070038 permissions:
39 contents: write
40 steps:
41 - uses: actions/checkout@v4
42 with:
43 fetch-depth: 0
44
45 - name: Push to main
46 run: |
47 git config --global user.name "GitHub Actions Bot"
48 git config --global user.email "actions@github.com"
49 git push origin HEAD:main