-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Canceling Previous Workflows on PRs from Forks [SAME VERSION] (#…
…284) * use workflow_run trigger in cancel workflow * only run cancel workflow explicitly for pull_request events
- Loading branch information
1 parent
b3410c8
commit 302af3b
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
name: Cancel Previous PR Workflows | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
workflow_run: | ||
workflows: ["Dependencies autoupdate", "Build Agents", "Build Anomaly Detection App Container", "Build Controller", "Build ONVIF Broker (.NET)", "Build OPC UA Monitoring Broker", "Build OpenCV Base", "Build Production Rust Code", "Build Rust CrossBuild", "Build UDEV Broker", "Build Video Streaming App Container", "Build Webhook Configuration", "Check Rust", "Check versioning", "Helm", "Tarpaulin Code Coverage", "Test K3s, Kubernetes, and MicroK8s"] | ||
types: | ||
- requested | ||
jobs: | ||
cancel: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.event == 'pull_request' | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
workflow_id: "auto-update-dependencies.yml, build-agent-container.yml, build-anomaly-detection-app-container.yml, build-controller-container.yml, build-onvif-video-broker-container.yml, build-opcua-monitoring-broker-container.yml, build-opencv-base-container.yml, build-rust-code.yml, build-rust-crossbuild-container.yml, build-udev-video-broker-container.yml, build-video-streaming-app-container.yml, build-webhook-configuration-container.yml, check-rust.yml, check-versioning.yml, run-helm.yml, run-tarpaulin.yml, run-test-cases.yml" | ||
workflow_id: ${{ github.event.workflow.id }} |