mirror of
https://github.com/coder/coder.git
synced 2026-10-31 19:36:41 +08:00
Bumps the github-actions group with 2 updates: [fluxcd/flux2/action](https://github.com/fluxcd/flux2) and [linear/linear-release-action](https://github.com/linear/linear-release-action). Updates `fluxcd/flux2/action` from 2.9.3 to 2.9.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/fluxcd/flux2/releases">fluxcd/flux2/action's releases</a>.</em></p> <blockquote> <h2>v2.9.4</h2> <h2>Highlights</h2> <p>Flux v2.9.4 is a patch release that ships various fixes to the Flux controllers, covering source-watcher tarball extraction and glob expansion limits, the refspecs accepted by <code>ImageUpdateAutomation</code>, the HTTP request limits of the notification-controller servers, and Helm repository index loading, OCI chart digest pinning, <code>Bucket</code> error handling and GCS static authentication in source-controller. On the CLI side, <code>flux migrate -f</code> now supports migrating repositories to Flux 2.9. Users are encouraged to upgrade for the best experience.</p> <p>Note that this release contains CRD schema changes for <code>ArtifactGenerator</code> and <code>ImageUpdateAutomation</code>; both CRDs must be updated along with the controllers.</p> <p>ℹ️ Please follow the <a href="https://github.com/fluxcd/flux2/discussions/5572">Upgrade Procedure for Flux v2.7+</a> for a smooth upgrade from Flux v2.6 to the latest version.</p> <p>Fixes:</p> <ul> <li>Confine tarball extraction and bound glob expansion (source-watcher)</li> <li>Disallow force-update and deletion via refspecs (image-automation-controller)</li> <li>Unify HTTP server request limits (notification-controller)</li> <li>Align Helm repository index loading with upstream Helm v4 (source-controller)</li> <li>Improve error handling in <code>Bucket</code> reconciliation (source-controller)</li> <li>Pin OCI chart verification by digest (source-controller)</li> <li>Limit GCS static authentication to service account keys (source-controller)</li> <li>Restrict the <code>allow-webhooks</code> network policy to the receiver port (flux CLI)</li> </ul> <p>Improvements:</p> <ul> <li>Add support for migrating repositories to 2.9 in <code>flux migrate -f</code> (flux CLI)</li> <li>Update fluxcd/pkg dependencies, which align the ECR host detection with upstream (source-controller, image-reflector-controller, flux CLI)</li> <li>Update Bitbucket Cloud receiver guidance (notification-controller)</li> </ul> <h2>Components changelog</h2> <ul> <li>source-controller <a href="https://github.com/fluxcd/source-controller/blob/v1.9.4/CHANGELOG.md">v1.9.4</a></li> <li>source-watcher <a href="https://github.com/fluxcd/source-watcher/blob/v2.2.3/CHANGELOG.md">v2.2.3</a></li> <li>notification-controller <a href="https://github.com/fluxcd/notification-controller/blob/v1.9.3/CHANGELOG.md">v1.9.3</a></li> <li>image-reflector-controller <a href="https://github.com/fluxcd/image-reflector-controller/blob/v1.2.4/CHANGELOG.md">v1.2.4</a></li> <li>image-automation-controller <a href="https://github.com/fluxcd/image-automation-controller/blob/v1.2.4/CHANGELOG.md">v1.2.4</a></li> </ul> <h2>CLI changelog</h2> <ul> <li>[release/v2.9.x] Add support for 2.9 in <code>migrate -f</code> by <a href="https://github.com/fluxcdbot"><code>@fluxcdbot</code></a> in <a href="https://redirect.github.com/fluxcd/flux2/pull/6021">fluxcd/flux2#6021</a></li> <li>Update fluxcd/pkg dependencies by <a href="https://github.com/fluxcdbot"><code>@fluxcdbot</code></a> in <a href="https://redirect.github.com/fluxcd/flux2/pull/6026">fluxcd/flux2#6026</a></li> <li>[release/v2.9.x] fix: restrict <code>allow-webhooks</code> netpol to receiver port by <a href="https://github.com/fluxcdbot"><code>@fluxcdbot</code></a> in <a href="https://redirect.github.com/fluxcd/flux2/pull/6029">fluxcd/flux2#6029</a></li> <li>Update toolkit components by <a href="https://github.com/fluxcdbot"><code>@fluxcdbot</code></a> in <a href="https://redirect.github.com/fluxcd/flux2/pull/6031">fluxcd/flux2#6031</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/fluxcd/flux2/compare/v2.9.3...v2.9.4">https://github.com/fluxcd/flux2/compare/v2.9.3...v2.9.4</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/fluxcd/flux2/commit/889be9d6cc8afa8ed639e1e1ba4ab678e3b38d8c"><code>889be9d</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6031">#6031</a> from fluxcd/update-components-release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/38254293dabb1e982c08d9596e619b615bf48ac7"><code>3825429</code></a> Update toolkit components</li> <li><a href="https://github.com/fluxcd/flux2/commit/ffe365a4536bce3450f9b94358887a7c4bd693fe"><code>ffe365a</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6029">#6029</a> from fluxcd/backport-6028-to-release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/8ac865ce1ea514b1d4b8b6c94b63d327897cc28b"><code>8ac865c</code></a> fix: restrict allow-webhooks netpol to receiver port</li> <li><a href="https://github.com/fluxcd/flux2/commit/c49a4868e014340e569c26d6b825e41a5ce4b4ec"><code>c49a486</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6026">#6026</a> from fluxcd/update-pkg-deps/release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/4942d15825f1b4b7bc14c35035c309cb761775b7"><code>4942d15</code></a> Update fluxcd/pkg dependencies</li> <li><a href="https://github.com/fluxcd/flux2/commit/a2d0b2919a3796c56f4ab629095b991155143103"><code>a2d0b29</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6021">#6021</a> from fluxcd/backport-6020-to-release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/f4ad9e5f4a7e509cb2a6c83bc0693181825c61da"><code>f4ad9e5</code></a> Add support for 2.9 in migrate -f</li> <li>See full diff in <a href="https://github.com/fluxcd/flux2/compare/16602fa989daa99762f1c6d1186ae2ad1c735815...889be9d6cc8afa8ed639e1e1ba4ab678e3b38d8c">compare view</a></li> </ul> </details> <br /> Updates `linear/linear-release-action` from 0.15.0 to 0.15.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/linear/linear-release-action/releases">linear/linear-release-action's releases</a>.</em></p> <blockquote> <h2>v0.15.1</h2> <h2>What's Changed</h2> <ul> <li>Expose the CLI --issue-pattern flag as an issue_pattern input by <a href="https://github.com/RomainCscn"><code>@RomainCscn</code></a> in <a href="https://redirect.github.com/linear/linear-release-action/pull/56">linear/linear-release-action#56</a></li> <li>Release v0.15.1 by <a href="https://github.com/RomainCscn"><code>@RomainCscn</code></a> in <a href="https://redirect.github.com/linear/linear-release-action/pull/57">linear/linear-release-action#57</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/linear/linear-release-action/compare/v0.15.0...v0.15.1">https://github.com/linear/linear-release-action/compare/v0.15.0...v0.15.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/linear/linear-release-action/commit/17b8c24f8ceb2b98cabaf1965ff83c55dd596fac"><code>17b8c24</code></a> Release v0.15.1 (<a href="https://redirect.github.com/linear/linear-release-action/issues/57">#57</a>)</li> <li><a href="https://github.com/linear/linear-release-action/commit/cb0977c25f7e16b4ea2e89d9f71841e3f887dea4"><code>cb0977c</code></a> Expose the CLI --issue-pattern flag as an issue_pattern input (<a href="https://redirect.github.com/linear/linear-release-action/issues/56">#56</a>)</li> <li>See full diff in <a href="https://github.com/linear/linear-release-action/compare/af56a9a388625921f3757a2f988e4d7aca958377...17b8c24f8ceb2b98cabaf1965ff83c55dd596fac">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
128 lines
5.0 KiB
YAML
128 lines
5.0 KiB
YAML
name: deploy
|
|
|
|
on:
|
|
# Via workflow_call, called from ci.yaml
|
|
workflow_call:
|
|
inputs:
|
|
image:
|
|
description: "Image and tag to potentially deploy. Current branch will be validated against should-deploy check."
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }} # no per-branch concurrency
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
# Determines if the given branch should be deployed to dogfood.
|
|
should-deploy:
|
|
name: should-deploy
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
verdict: ${{ steps.check.outputs.verdict }} # DEPLOY or NOOP
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Check if deploy is enabled
|
|
id: check
|
|
run: |
|
|
set -euo pipefail
|
|
verdict="$(./scripts/should_deploy.sh)"
|
|
echo "verdict=$verdict" >> "$GITHUB_OUTPUT"
|
|
|
|
deploy:
|
|
name: "deploy"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs: should-deploy
|
|
if: needs.should-deploy.outputs.verdict == 'DEPLOY'
|
|
permissions:
|
|
contents: read
|
|
id-token: write # to authenticate to EKS cluster
|
|
packages: write # to retag image as dogfood
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: GHCR Login
|
|
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
|
|
with:
|
|
role-to-assume: ${{ vars.AWS_DOGFOOD_DEPLOY_ROLE }}
|
|
aws-region: ${{ vars.AWS_DOGFOOD_DEPLOY_REGION }}
|
|
|
|
- name: Get Cluster Credentials
|
|
run: aws eks update-kubeconfig --name "$AWS_DOGFOOD_CLUSTER_NAME" --region "$AWS_DOGFOOD_DEPLOY_REGION"
|
|
env:
|
|
AWS_DOGFOOD_CLUSTER_NAME: ${{ vars.AWS_DOGFOOD_CLUSTER_NAME }}
|
|
AWS_DOGFOOD_DEPLOY_REGION: ${{ vars.AWS_DOGFOOD_DEPLOY_REGION }}
|
|
|
|
- name: Set up Flux CLI
|
|
uses: fluxcd/flux2/action@889be9d6cc8afa8ed639e1e1ba4ab678e3b38d8c # v2.9.4
|
|
with:
|
|
# Keep this and the github action up to date with the version of flux installed in dogfood cluster
|
|
version: "2.8.2"
|
|
|
|
# Retag image as dogfood while maintaining the multi-arch manifest
|
|
- name: Tag image as dogfood
|
|
run: docker buildx imagetools create --tag "ghcr.io/coder/coder-preview:dogfood" "$IMAGE"
|
|
env:
|
|
IMAGE: ${{ inputs.image }}
|
|
|
|
- name: Reconcile Flux
|
|
run: |
|
|
set -euxo pipefail
|
|
flux --namespace flux-system reconcile source git flux-system
|
|
flux --namespace flux-system reconcile source git coder-main
|
|
flux --namespace flux-system reconcile kustomization flux-system
|
|
flux --namespace flux-system reconcile kustomization coder
|
|
flux --namespace flux-system reconcile source chart coder-coder
|
|
flux --namespace flux-system reconcile source chart coder-coder-provisioner
|
|
flux --namespace coder reconcile helmrelease coder
|
|
flux --namespace coder reconcile helmrelease coder-provisioner
|
|
flux --namespace coder reconcile helmrelease coder-provisioner-tagged
|
|
flux --namespace coder reconcile helmrelease coder-provisioner-tagged-prebuilds
|
|
|
|
# Just updating Flux is usually not enough. The Helm release may get
|
|
# redeployed, but unless something causes the Deployment to update the
|
|
# pods won't be recreated. It's important that the pods get recreated,
|
|
# since we use `imagePullPolicy: Always` to ensure we're running the
|
|
# latest image.
|
|
- name: Rollout Deployment
|
|
run: |
|
|
set -euxo pipefail
|
|
kubectl --namespace coder rollout restart deployment/coder
|
|
kubectl --namespace coder rollout status deployment/coder
|
|
kubectl --namespace coder rollout restart deployment/coder-provisioner
|
|
kubectl --namespace coder rollout status deployment/coder-provisioner
|
|
kubectl --namespace coder rollout restart deployment/coder-provisioner-tagged
|
|
kubectl --namespace coder rollout status deployment/coder-provisioner-tagged
|
|
kubectl --namespace coder rollout restart deployment/coder-provisioner-tagged-prebuilds
|
|
kubectl --namespace coder rollout status deployment/coder-provisioner-tagged-prebuilds
|