Skip to content

Commit

Permalink
feat(workflows): Auto-cancel in-progress actions with the same ref
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung committed Feb 12, 2025
1 parent de9f7fb commit 21e22ce
Show file tree
Hide file tree
Showing 31 changed files with 155 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/library-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/base/**'
- '.github/workflows/library-base.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-bun1.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-bun1.1.yaml'
- '!library/bun/1.1/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-caddy2.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-caddy2.7.yaml'
- '!library/caddy/2.7/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-dragonfly1.14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-dragonfly1.14.yaml'
- '!library/dragonfly/1.14/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-findtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-findtime.yaml'
- '!library/findtime/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-grafana10.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-grafana10.2.yaml'
- '!library/grafana/10.2/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-haproxy2.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-haproxy2.8.yaml'
- '!library/haproxy/2.8/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-helloworld.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
- 'library/helloworld/**'
- '.github/workflows/library-helloworld.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-hugo0.122.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-hugo0.122.yaml'
- '!library/hugo/0.122/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-imaginary1.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-imaginary1.2.yaml'
- '!library/imaginary/1.2/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-java17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-java17.yaml'
- '!library/java/17/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-lua5.4.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-lua5.4.4.yaml'
- '!library/lua/5.4.4/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-lua5.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/lua/5.4/**'
- '.github/workflows/library-lua5.4.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-mariadb11.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-mariadb11.2.yaml'
- '!library/mariadb/11.2/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-memcached1.6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-memcached1.6.yaml'
- '!library/memcached/1.6/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-mongo6.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-mongo6.0.yaml'
- '!library/mongo/6.0/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-nginx1.15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/nginx/1.15/**'
- '.github/workflows/library-nginx1.15.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-nginx1.25.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-nginx1.25.yaml'
- '!library/nginx/1.25/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-node18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-node18.yaml'
- '!library/node/18/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-node20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- '.github/workflows/library-node20.yaml'
- '!library/node/20/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-node21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-node21.yaml'
- '!library/node/21/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-perl5.38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-perl5.38.yaml'
- '!library/perl/5.38/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-php8.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/php/8.2/**'
- '.github/workflows/library-php8.2.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-python3.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/python/3.10/**'
- '.github/workflows/library-python3.10.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-python3.12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/python/3.12/**'
- '.github/workflows/library-python3.12.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-redis7.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/redis/7.0/**'
- '.github/workflows/library-redis7.0.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-redis7.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/redis/7.2/**'
- '.github/workflows/library-redis7.2.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-ruby3.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/ruby/3.2/**'
- '.github/workflows/library-ruby3.2.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-skipper0.18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ on:
- '.github/workflows/library-skipper0.18.yaml'
- '!library/skipper/0.18/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-sqlite3.40.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
- 'library/sqlite/3.40/**'
- '.github/workflows/library-sqlite3.40.yaml'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/library-surreal1.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- '.github/workflows/library-surreal1.1.yaml'
- '!library/surreal/1.1/README.md'

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
Expand Down

0 comments on commit 21e22ce

Please sign in to comment.