mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-16 21:04:25 +01:00
Let's make sure we cancel previous runs, mainly as we have some of those that take a lot of time to run, whenever the PR is updated. This is based on the following stack overflow suggestion: https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre This is very much needed as we don't want to wait for a long time to have access to a runner because of other runners are still being used performing a task that's meaningless due to the PR update. Fixes: #7298 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
32 lines
1016 B
YAML
32 lines
1016 B
YAML
name: Cargo Crates Check Runner
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- synchronize
|
|
paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
cargo-deny-runner:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
uses: actions/checkout@v3
|
|
- name: Generate Action
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
run: bash cargo-deny-generator.sh
|
|
working-directory: ./.github/cargo-deny-composite-action/
|
|
env:
|
|
GOPATH: ${{ runner.workspace }}/kata-containers
|
|
- name: Run Action
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
|
uses: ./.github/cargo-deny-composite-action
|