ci: wait for CI checks before dependabot auto-merge
- commit
- 676e4cd1110edbc939cd553bf1e5ec82727c0e34
- author
- Kit · · 2025-12-15 06:39 UTC
- committer
- Kit · · 2025-12-15 06:39 UTC
- parent
- 267d526
- signature
- SSH Unverified
SHA256:3RGv7q1rcg0JUU2CjMAhwZcyGvcCDmFuxQQT8Z18wLA· arch-ssh This key is not trusted for the committer email
3 files · +9 -2
M .github/workflows/ci.yml +1 -1
| @@ -23,7 +23,7 @@ jobs: | |||
| 23 | 23 | # version comes from packageManager field in package.json | |
| 24 | 24 | - uses: actions/setup-node@v4 | |
| 25 | 25 | with: | |
| 26 | - | node-version: '22' | |
| 26 | + | node-version: '22.13.0' | |
| 27 | 27 | cache: 'pnpm' | |
| 28 | 28 | - run: pnpm install --frozen-lockfile | |
| 29 | 29 | - run: pnpm run check | |
| @@ -23,7 +23,7 @@ jobs: | |||||
| 23 | # version comes from packageManager field in package.json | 23 | # version comes from packageManager field in package.json | ||
| 24 | - uses: actions/setup-node@v4 | 24 | - uses: actions/setup-node@v4 | ||
| 25 | with: | 25 | with: | ||
| 26 | - | node-version: '22' | 26 | + | node-version: '22.13.0' |
| 27 | cache: 'pnpm' | 27 | cache: 'pnpm' | ||
| 28 | - run: pnpm install --frozen-lockfile | 28 | - run: pnpm install --frozen-lockfile | ||
| 29 | - run: pnpm run check | 29 | - run: pnpm run check | ||
M .github/workflows/dependabot-auto-merge.yml +7 -0
| @@ -6,6 +6,7 @@ on: | |||
| 6 | 6 | permissions: | |
| 7 | 7 | contents: write | |
| 8 | 8 | pull-requests: write | |
| 9 | + | checks: read | |
| 9 | 10 | ||
| 10 | 11 | jobs: | |
| 11 | 12 | dependabot: | |
| @@ -17,6 +18,12 @@ jobs: | |||
| 17 | 18 | uses: dependabot/fetch-metadata@v2 | |
| 18 | 19 | with: | |
| 19 | 20 | github-token: '${{ secrets.GITHUB_TOKEN }}' | |
| 21 | + | - name: Wait for CI to pass | |
| 22 | + | if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | |
| 23 | + | run: gh pr checks "$PR_URL" --watch --fail-level all | |
| 24 | + | env: | |
| 25 | + | PR_URL: ${{ github.event.pull_request.html_url }} | |
| 26 | + | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 20 | 27 | - name: Enable auto-merge for minor/patch | |
| 21 | 28 | if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | |
| 22 | 29 | run: gh pr merge --auto --squash "$PR_URL" | |
| @@ -6,6 +6,7 @@ on: | |||||
| 6 | permissions: | 6 | permissions: | ||
| 7 | contents: write | 7 | contents: write | ||
| 8 | pull-requests: write | 8 | pull-requests: write | ||
| 9 | + | checks: read | |||
| 9 | 10 | ||||
| 10 | jobs: | 11 | jobs: | ||
| 11 | dependabot: | 12 | dependabot: | ||
| @@ -17,6 +18,12 @@ jobs: | |||||
| 17 | uses: dependabot/fetch-metadata@v2 | 18 | uses: dependabot/fetch-metadata@v2 | ||
| 18 | with: | 19 | with: | ||
| 19 | github-token: '${{ secrets.GITHUB_TOKEN }}' | 20 | github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
| 21 | + | - name: Wait for CI to pass | |||
| 22 | + | if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | |||
| 23 | + | run: gh pr checks "$PR_URL" --watch --fail-level all | |||
| 24 | + | env: | |||
| 25 | + | PR_URL: ${{ github.event.pull_request.html_url }} | |||
| 26 | + | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||
| 20 | - name: Enable auto-merge for minor/patch | 27 | - name: Enable auto-merge for minor/patch | ||
| 21 | if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | 28 | if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | ||
| 22 | run: gh pr merge --auto --squash "$PR_URL" | 29 | run: gh pr merge --auto --squash "$PR_URL" | ||
M .node-version +1 -1
| @@ -1,1 +1,1 @@ | |||
| 1 | - | 22⏎̸ | |
| 1 | + | 22.13.0⏎̸ | |
| @@ -1,1 +1,1 @@ | |||||
| 1 | - | 22⏎̸ | 1 | + | 22.13.0⏎̸ |