Skip to content

Commit

Permalink
[infra/github] Cancel running workflow on PR update
Browse files Browse the repository at this point in the history
This commit updates workflows to cancel running workflows including heavy overhead when a PR is update.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh committed Jan 22, 2025
1 parent d49a507 commit 85d713e
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-dev-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
- '.github/workflows/build-dev-docker.yml'
- 'infra/docker/**'

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
# Build on docker CLI for PR test without login
build-pr-test:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/generate-rootfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
- cron: '0 15 1 * *'
workflow_dispatch:

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
gen-rootfs:
if: github.repository_owner == 'Samsung'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/run-onecc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
onecc-test:
if: github.repository_owner == 'Samsung'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/run-onert-android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/run-onert-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
if: github.repository_owner == 'Samsung'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/run-onert-gbs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/run-onert-micro-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
run-onert-micro-unit-tests:
name: Run onert-micro Unit tests
Expand Down

0 comments on commit 85d713e

Please sign in to comment.