Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Add concurrency settings for workflow (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrz1999 authored Oct 12, 2022
1 parent 0c1dcdd commit 87847eb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_imaginary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
default: true
description: Set to `false` to trigger _just_ a redeployment

concurrency: ${{ github.workflow }}-${{ inputs.deploy-to }}

jobs:
build:
name: Build
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
- published
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'release' && 'release' || github.ref }}
# Don't continue building images for a PR if the PR is updated quickly
# For other workflows, allow them to complete and just block on them. This
# ensures deployments in particular to happen in series rather than parallel.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
name: Lint
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/migration_safety_warning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
paths:
- "**/migrations/**/*"

concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests.
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
check-and-apply-labels:
name: "Check and Apply Labels"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
description: Commit that the image is built from
required: true

concurrency: ${{ github.workflow }}-${{ inputs.image }}-${{ inputs.commit }}

jobs:
push:
name: Publish requested Docker image
Expand Down

0 comments on commit 87847eb

Please sign in to comment.