Skip to content

Commit

Permalink
Use GitHub Action concurrency feature to cancel stale CI executions
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Dec 8, 2021
1 parent fd3c1d0 commit 8373d4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/buildcache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches:
- master

concurrency:
# On master/release, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' ) && format('ci-buildcache-{0}', github.sha) || format('ci-buildcache-{0}', github.ref) }}
cancel-in-progress: true

jobs:
seed-build-cache:
strategy:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/cancel-duplicates.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ on:
branches:
- '*'

concurrency:
# On master/release, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
cancel-in-progress: true

# Throw OutOfMemoryError in case less than 35% is free after full GC
# This avoids never-ending GC trashing if memory gets too low in case of a memory leak
env:
Expand Down

0 comments on commit 8373d4c

Please sign in to comment.