| 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: |
| Josh Bleecher Snyder | bd6c168 | 2025-04-25 12:04:07 -0700 | [diff] [blame] | 14 | - "queue-main-*" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 15 | |
| 16 | permissions: read-all |
| 17 | |
| 18 | jobs: |
| Josh Bleecher Snyder | bd6c168 | 2025-04-25 12:04:07 -0700 | [diff] [blame] | 19 | formatting: |
| 20 | uses: ./.github/workflows/formatting.yml |
| Josh Bleecher Snyder | ae77226 | 2025-04-25 20:02:22 +0000 | [diff] [blame] | 21 | permissions: |
| 22 | contents: write |
| Josh Bleecher Snyder | bd6c168 | 2025-04-25 12:04:07 -0700 | [diff] [blame] | 23 | with: |
| 24 | auto_fix: true |
| 25 | |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 26 | go-test: |
| Josh Bleecher Snyder | bd6c168 | 2025-04-25 12:04:07 -0700 | [diff] [blame] | 27 | needs: [formatting] |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 28 | uses: ./.github/workflows/go_test.yml |
| 29 | permissions: read-all |
| 30 | |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 31 | ui-test: |
| Josh Bleecher Snyder | bd6c168 | 2025-04-25 12:04:07 -0700 | [diff] [blame] | 32 | needs: [formatting] |
| Philip Zeyliger | 4de80d2 | 2025-04-23 12:33:31 -0700 | [diff] [blame] | 33 | uses: ./.github/workflows/webui_test.yml |
| 34 | permissions: read-all |
| 35 | |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 36 | push-to-main: |
| 37 | runs-on: ubuntu-latest |
| Josh Bleecher Snyder | bd6c168 | 2025-04-25 12:04:07 -0700 | [diff] [blame] | 38 | needs: [go-test, ui-test] |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 39 | permissions: |
| 40 | contents: write |
| 41 | steps: |
| 42 | - uses: actions/checkout@v4 |
| 43 | with: |
| 44 | fetch-depth: 0 |
| 45 | |
| 46 | - name: Push to main |
| 47 | run: | |
| 48 | git config --global user.name "GitHub Actions Bot" |
| 49 | git config --global user.email "actions@github.com" |
| Josh Bleecher Snyder | ddc8142 | 2025-04-25 19:47:05 +0000 | [diff] [blame] | 50 | git push https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/boldsoftware/sketch.git HEAD:main |
| 51 | env: |
| 52 | GITHUB_TOKEN: ${{ github.token }} |