mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-08-02 08:37:34 -07:00
fix: make CI workflows run after pushing excemptions for cargo-vet
This commits changes the CI for dependabot PRs such that initially, only the exemptions for cargo vet are regenerated and pushed to the PR. Only after that, all other workflows are triggered. This ensures that the CI result for dependabot PRs is properly presented on github.
This commit is contained in:
@@ -14,6 +14,15 @@ on:
|
||||
- ".github/workflows/docker.yaml"
|
||||
branches:
|
||||
- "main"
|
||||
workflow_run:
|
||||
workflows: [Regenerate cargo-vet exemptions for dependabot-PRs]
|
||||
types:
|
||||
- completed
|
||||
paths:
|
||||
- "docker/Dockerfile"
|
||||
- ".github/workflows/docker.yaml"
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -24,6 +33,8 @@ jobs:
|
||||
# 1. BUILD & TEST
|
||||
# --------------------------------
|
||||
build-and-test-rp:
|
||||
# Only run this for dependabot PRs if it's triggered by the workflow to regenerate cargo-vet exemptions
|
||||
if: ${{ github.actor != 'dependabot[bot]' || github.event_name == 'workflow_run' }}
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [amd64, arm64]
|
||||
@@ -118,8 +129,8 @@ jobs:
|
||||
docker-image-rp:
|
||||
needs:
|
||||
- build-and-test-rp
|
||||
# Skip if this is not a PR. Then we want to push this image.
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
# Only run this job if it s triggered by by a push to the main branch or a version tag.
|
||||
if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_run' }}
|
||||
# Use a matrix to build for both AMD64 and ARM64
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -183,8 +194,8 @@ jobs:
|
||||
docker-image-rosenpass:
|
||||
needs:
|
||||
- build-and-test-rp
|
||||
# Skip if this is not a PR. Then we want to push this image.
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
# Only run this job if it s triggered by by a push to the main branch or a version tag.
|
||||
if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_run' }}
|
||||
# Use a matrix to build for both AMD64 and ARM64
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -249,7 +260,7 @@ jobs:
|
||||
needs:
|
||||
- docker-image-rosenpass
|
||||
- docker-image-rp
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
if: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_run' }}
|
||||
strategy:
|
||||
matrix:
|
||||
target: [rp, rosenpass]
|
||||
|
||||
Reference in New Issue
Block a user