| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | # 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 | |
| 10 | name: Main Branch Commit Queue |
| 11 | on: |
| 12 | push: |
| 13 | branches: |
| 14 | - "queue-main-**" |
| 15 | |
| 16 | permissions: read-all |
| 17 | |
| 18 | jobs: |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame^] | 19 | go-test: |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 20 | uses: ./.github/workflows/go_test.yml |
| 21 | permissions: read-all |
| 22 | |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame^] | 23 | ui-test: |
| 24 | uses: ./.github/workflows/webui_test.yml |
| 25 | permissions: read-all |
| 26 | |
| 27 | formatting: |
| 28 | uses: ./.github/workflows/formatting.yml |
| 29 | permissions: read-all |
| 30 | |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 31 | push-to-main: |
| 32 | runs-on: ubuntu-latest |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame^] | 33 | needs: [go-test, ui-test, formatting] |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 34 | permissions: |
| 35 | contents: write |
| 36 | steps: |
| 37 | - uses: actions/checkout@v4 |
| 38 | with: |
| 39 | fetch-depth: 0 |
| 40 | |
| 41 | - name: Push to main |
| 42 | run: | |
| 43 | git config --global user.name "GitHub Actions Bot" |
| 44 | git config --global user.email "actions@github.com" |
| 45 | git push origin HEAD:main |