Skip to content

Commit

Permalink
automation: reduce risk of deployments getting cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed May 17, 2024
1 parent 38385d4 commit fc555dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy-hubs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@ on:
# Exclude the template configuration files
- "!config/clusters/templates"

# When multiple PRs triggering this workflow are merged, queue them instead
# of running them in parallel
# https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
concurrency: deploy
# Queue triggered executions of this workflow stemming from pushes to avoid
# deployment conflicts.
#
# By using a different concurrency groups for pull requests and pushes, we
# reduce the risk of cancelling a queued but not started workflow as discussed
# in https://github.com/2i2c-org/infrastructure/issues/3214.
#
# github.head_ref is used to create PR unique concurrency groups, and for
# workflow executions not triggered by a PR we get a dedicated group.
#
# ref: https://docs.github.com/en/actions/using-jobs/using-concurrency
#
concurrency: ${{ github.workflow }}-${{ github.head_ref || 'not-a-pr' }}

# This environment variable triggers the deployer to colourise print statements in the
# GitHug Actions logs for easy reading
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ensure-uptime-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ on:
# The way terraform is deployed might have changed!
- .github/workflows/ensure-uptime-checks.yaml

# When multiple PRs triggering this workflow are merged, queue them instead
# of running them in parallel
# https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
concurrency: uptime-checks
# Queue executions of this workflow to avoid conflicts
# ref: https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency: ${{ github.workflow }}

# This environment variable triggers the deployer to colourise print statements in the
# GitHub Actions logs for easy reading
Expand Down

0 comments on commit fc555dc

Please sign in to comment.