CI: Skip release-dry-run on pull_request (#1435)

For PRs opened by contributors who are not part of the cargo-bins team and for
PRs opened by dependabot, they cannot access the secrets, thus signing will
always fail.

Skipping release-dry-run on pull_request would fix that for them, while
retaining the signing stage on merge_queue and on main to ensure that the
release workflow is working.

It will also speedup CI for PR.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-09-30 23:36:23 +10:00 committed by GitHub
parent a69beccf1a
commit 78eb0921e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,7 @@ jobs:
release-dry-run:
uses: ./.github/workflows/release-cli.yml
if: github.event_name != 'pull_request'
secrets: inherit
with:
info: |
@ -258,7 +259,7 @@ jobs:
if: always() # always run even if dependencies fail
runs-on: ubuntu-latest
steps:
# fail if ANY dependency has failed or been skipped or cancelled
- if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')"
# fail if ANY dependency has failed or cancelled
- if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')"
run: exit 1
- run: exit 0