chore: pin dogfood to release branch during release freeze (#20028)

Relates to https://github.com/coder/dogfood/pull/189
Closes https://github.com/coder/internal/issues/1021

- Adds new script `scripts/should_deploy.sh` which implements the
algorithm in the linked issue
- Changes the `ci.yaml` workflow to run on release branches
- Moves the deployment steps out of `ci.yaml` into a new workflow
`deploy.yaml` for concurrency limiting purposes
- Changes the behavior of image tag pushing slightly:
    - Versioned tags will no longer have a `main-` prefix
    - `main` branch will still push the `main` and `latest` tags
    - `release/x.y` branches will now push `release-x.y` tags
- The deploy job will exit early if `should_deploy.sh` returns false
- The deploy job will now retag whatever image it's about to deploy as
`dogfood`
This commit is contained in:
Dean Sheather
2025-10-02 12:12:29 +10:00
committed by GitHub
parent 76d6e13185
commit e5c8c9bdaf
5 changed files with 280 additions and 119 deletions
+1 -4
View File
@@ -51,10 +51,7 @@ fi
image="${CODER_IMAGE_BASE:-ghcr.io/coder/coder}"
# use CODER_IMAGE_TAG_PREFIX if set as a prefix for the tag
tag_prefix="${CODER_IMAGE_TAG_PREFIX:-}"
tag="${tag_prefix:+$tag_prefix-}v$version"
tag="v$version"
if [[ "$version" == "latest" ]]; then
tag="latest"