Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,20 @@ on:
required: false
default: "blue_green"
type: string
concurrency_group:
description: Deploys with the same group run one at a time. Empty runs every deploy of the repository one at a time. Give apps their own group only when their deploys can overlap on a host.
required: false
type: string
default: ""

jobs:
deploy:
name: Deploy via webhook
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: deploy-${{ inputs.env }}
group: deploy-${{ inputs.concurrency_group }}
steps:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v4

- name: Login to Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger deployment webhook with output
run: |
set -uo pipefail # no "e" because we want to retrieve the curl output
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ Example usage:
image_repo: ghcr.io/${{ github.repository }}
image_tag: ${{ github.sha }}
```

The deploys of a repository run one at a time. To let two apps deploy at the same time, give each its own `concurrency_group`, for example `concurrency_group: ${{ matrix.config.app }}` in a matrix of apps. Only do this for apps whose deploys can overlap on a host: two `blue_green` apps on the same host can't, the deploy hook writes their Traefik weights through the same temporary file.
Loading