Skip to content

Commit

Permalink
Add cancel-in-progress
Browse files Browse the repository at this point in the history
Intention is to cancel ongoing/queued jobs if a new version of a PR is uploaded

Fixes #626
  • Loading branch information
erikbosch authored and SebastianSchildt committed Sep 12, 2023
1 parent 226808f commit fd93183
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check_license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: spdx

on:
pull_request

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
check-spdx-headers:
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v3
with:
# required to grab the history of the PR
fetch-depth: 0

- name: Get changed files
run: |
echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | tr '\n' ',')" >> $GITHUB_ENV
- name: Set license
run: |
echo "licenses=Apache-2.0" >> $GITHUB_ENV
- uses: eclipse-kuksa/kuksa-actions/spdx@2
with:
files: "${{ env.files }}"
licenses: "${{ env.licenses }}"
5 changes: 5 additions & 0 deletions .github/workflows/kuksa-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
- "proto/**"
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
checkrights:
uses: ./.github/workflows/check_push_rights.yml
Expand Down Expand Up @@ -103,6 +107,7 @@ jobs:

kuksa-client-test:
runs-on: ubuntu-latest

steps:
- name: Checkout kuksa.val
uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ name: pre-commit

on: [pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
Expand Down

0 comments on commit fd93183

Please sign in to comment.