|
21 | 21 | options: |
22 | 22 | - "all" |
23 | 23 | - "install-script-only" |
| 24 | + skip-checks: |
| 25 | + description: skip the check-gate (release even if checks haven't passed on main) |
| 26 | + type: boolean |
| 27 | + default: false |
| 28 | + required: false |
24 | 29 |
|
25 | 30 | jobs: |
26 | 31 | version-available: |
|
32 | 37 | version: ${{ github.event.inputs.version }} |
33 | 38 |
|
34 | 39 | check-gate: |
35 | | - if: ${{ github.event.inputs.phase == 'all' }} |
| 40 | + if: ${{ github.event.inputs.phase == 'all' && !inputs.skip-checks }} |
36 | 41 | permissions: |
37 | 42 | contents: read |
38 | 43 | checks: read # required for getting the status of specific check names |
|
45 | 50 |
|
46 | 51 | release: |
47 | 52 | needs: [check-gate, version-available] |
48 | | - if: ${{ github.event.inputs.phase == 'all' }} |
| 53 | + # run even when check-gate is skipped, but never when version-available |
| 54 | + # failed/was skipped, nor when check-gate failed or was cancelled. note: |
| 55 | + # always() disables the implicit success() gate on ALL needs, so the |
| 56 | + # version-available requirement must be re-asserted explicitly here. |
| 57 | + if: >- |
| 58 | + ${{ always() |
| 59 | + && needs.version-available.result == 'success' |
| 60 | + && !contains(fromJSON('["failure", "cancelled"]'), needs.check-gate.result) }} |
49 | 61 | environment: release |
50 | 62 | # runs-on.com: compute instances for parallel builds |
51 | 63 | # spot disabled: reliability for build workflows (used for releases too) |
|
82 | 94 | - name: Build & publish release artifacts |
83 | 95 | run: make ci-release |
84 | 96 | env: |
85 | | - # used for pushing tags |
86 | | - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} |
| 97 | + # for pushing tags (does not inherit workflow permissions) |
| 98 | + TAG_TOKEN: ${{ secrets.TAG_TOKEN }} |
87 | 99 | RELEASE_VERSION: ${{ github.event.inputs.version }} |
88 | 100 | # for mac signing and notarization... |
89 | 101 | QUILL_SIGN_P12: ${{ secrets.ANCHORE_APPLE_DEVELOPER_ID_CERT_CHAIN }} |
|
0 commit comments