Bumps the github-actions group with 4 updates: [step-security/harden-runner](https://github.com/step-security/harden-runner), [actions/upload-artifact](https://github.com/actions/upload-artifact), [fluxcd/flux2/action](https://github.com/fluxcd/flux2) and [linear/linear-release-action](https://github.com/linear/linear-release-action). Updates `step-security/harden-runner` from 2.21.1 to 2.22.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/step-security/harden-runner/releases">step-security/harden-runner's releases</a>.</em></p> <blockquote> <h2>v2.22.1</h2> <h2>What's Changed</h2> <ul> <li>Fixed security rules not initializing on GHES self-hosted runners</li> <li>Fixed GHES connectivity in block mode by implicitly allowing the GHES hostname</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/step-security/harden-runner/compare/v2.22.0...v2.22.1">https://github.com/step-security/harden-runner/compare/v2.22.0...v2.22.1</a></p> <h2>v2.22.0</h2> <h2>What's Changed</h2> <ul> <li>Linux ARM64 support for community tier</li> <li>GHES support for self-hosted VMs (enterprise tier)</li> <li>MacOS and Windows runner deny list support for block policy (enterprise tier).</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/step-security/harden-runner/compare/v2.21.1...v2.22.0">https://github.com/step-security/harden-runner/compare/v2.21.1...v2.22.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/step-security/harden-runner/commit/ccd8616d44fd3846e67624a50d5aad6d37bf2d25"><code>ccd8616</code></a> Merge pull request <a href="https://redirect.github.com/step-security/harden-runner/issues/704">#704</a> from h0x0er/jatin/ghes-endp</li> <li><a href="https://github.com/step-security/harden-runner/commit/037ccfd0b8acd0743d7ce4b3e53f67dc16f831b9"><code>037ccfd</code></a> implicitly add ghes endpoint in allowList</li> <li><a href="https://github.com/step-security/harden-runner/commit/e7438c7b4d9fde75004beb1805ca407c067d5340"><code>e7438c7</code></a> Merge pull request <a href="https://redirect.github.com/step-security/harden-runner/issues/703">#703</a> from h0x0er/jatin/ghes-codebuild-fixes</li> <li><a href="https://github.com/step-security/harden-runner/commit/afb0b33c8978810916155d52997450fe76eea40a"><code>afb0b33</code></a> fixes for armour rules not getting initialised</li> <li><a href="https://github.com/step-security/harden-runner/commit/351661ca32ac09a36dc5ee2d536e3128f2a3c8ed"><code>351661c</code></a> Merge pull request <a href="https://redirect.github.com/step-security/harden-runner/issues/701">#701</a> from step-security/rc-44</li> <li><a href="https://github.com/step-security/harden-runner/commit/1dc7f2e42d1e949acb71b995cb46ef39bcf6ee43"><code>1dc7f2e</code></a> Merge pull request <a href="https://redirect.github.com/step-security/harden-runner/issues/702">#702</a> from h0x0er/jatin/ghes-changes-up</li> <li><a href="https://github.com/step-security/harden-runner/commit/af5ca3847fec87ec2d45ed150d07fe3afaca39e4"><code>af5ca38</code></a> simplified ghes config creation</li> <li><a href="https://github.com/step-security/harden-runner/commit/9a6d710958b49c0266ea466f1d9505af191114fa"><code>9a6d710</code></a> fix2</li> <li><a href="https://github.com/step-security/harden-runner/commit/74c65eac851c4c0546996bb406adcf91e6dd97c4"><code>74c65ea</code></a> fix</li> <li><a href="https://github.com/step-security/harden-runner/commit/ceac8169ef2b77fd1324abbf8bae8edd2d6d3199"><code>ceac816</code></a> resovled comments</li> <li>Additional commits viewable in <a href="https://github.com/step-security/harden-runner/compare/e14015d583714f6e62063499dc959a02595150a1...ccd8616d44fd3846e67624a50d5aad6d37bf2d25">compare view</a></li> </ul> </details> <br /> Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p> <blockquote> <h2>v7.0.2</h2> <h2>What's Changed</h2> <ul> <li>Improves artifact download retries when the service returns HTTP 429 (rate limiting), including honoring valid Retry-After headers.</li> <li>Updates <code>@actions/artifact</code> to v6.3.1.</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/tunc-d"><code>@tunc-d</code></a> made their first contribution in <a href="https://redirect.github.com/actions/upload-artifact/pull/821">actions/upload-artifact#821</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v7.0.1...v7.0.2">https://github.com/actions/upload-artifact/compare/v7.0.1...v7.0.2</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/upload-artifact/commit/cf430e030ddbb5b0abf93d22962f4752f3646cd9"><code>cf430e0</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/822">#822</a> from actions/tunc-d-prepare-upload-v7-0-2</li> <li><a href="https://github.com/actions/upload-artifact/commit/c2acdedd35a8824a1552c7137f8c18288c3ea469"><code>c2acded</code></a> chore: prepare v7.0.2 release</li> <li><a href="https://github.com/actions/upload-artifact/commit/4687c1bbaa0a58abb517d90b4bbade6754c80c1a"><code>4687c1b</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/821">#821</a> from actions/tunc-d-upload-artifact-package-bump</li> <li><a href="https://github.com/actions/upload-artifact/commit/8cbe1bebdb858105d8fdd88f81404d4de4595719"><code>8cbe1be</code></a> Bump <code>@actions/artifact</code> to 6.3.1</li> <li>See full diff in <a href="https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9">compare view</a></li> </ul> </details> <br /> Updates `fluxcd/flux2/action` from 2.9.5 to 2.9.6 <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.6</h2> <h2>Highlights</h2> <p>Flux v2.9.6 is a patch release that stops helm-controller from reapplying chart CRDs on every upgrade when server-side apply is enabled, and recovers HelmReleases left with a drifted <code>Ready=Unknown</code> condition after a failed status patch. source-controller normalizes Azure Blob listing ETags so unchanged containers are no longer re-downloaded on every reconcile, and evicts stale Helm repository index entries from the cache so repositories with frequently changing indexes no longer fail with "Cache is full". kustomize-controller extends SOPS decryption error redaction to <code>spec.postBuild.substituteFrom</code> values, so substituted secrets echoed back in API validation errors are masked out of status conditions and events, and adds the opt-in <code>DisableCommitStatusEvent</code> feature gate. Users are encouraged to upgrade for the best experience.</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>Stop reapplying chart CRDs on upgrades when using server-side apply with the default <code>Create</code> policy (helm-controller)</li> <li>Recover HelmReleases stranded with a drifted <code>Ready=Unknown</code> condition after a failed status patch (helm-controller)</li> <li>Ignore <code>NotFound</code> when deleting the HelmChart (helm-controller)</li> <li>Normalize Azure Blob listing ETags so unchanged containers are not re-downloaded on every reconcile (source-controller)</li> <li>Evict stale Helm repository index entries from the cache to avoid "Cache is full" errors (source-controller)</li> <li>Extend SOPS decryption error redaction to <code>spec.postBuild.substituteFrom</code> values (kustomize-controller)</li> </ul> <p>Improvements:</p> <ul> <li>Add the opt-in <code>DisableCommitStatusEvent</code> feature gate (kustomize-controller)</li> </ul> <h2>Components changelog</h2> <ul> <li>source-controller <a href="https://github.com/fluxcd/source-controller/blob/v1.9.6/CHANGELOG.md">v1.9.6</a></li> <li>kustomize-controller <a href="https://github.com/fluxcd/kustomize-controller/blob/v1.9.6/CHANGELOG.md">v1.9.6</a></li> <li>helm-controller <a href="https://github.com/fluxcd/helm-controller/blob/v1.6.5/CHANGELOG.md">v1.6.5</a></li> </ul> <h2>CLI changelog</h2> <ul> <li>[release/v2.9.x] Format reproducible created timestamp in UTC by <a href="https://github.com/fluxcdbot"><code>@fluxcdbot</code></a> in <a href="https://redirect.github.com/fluxcd/flux2/pull/6081">fluxcd/flux2#6081</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/6097">fluxcd/flux2#6097</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/fluxcd/flux2/compare/v2.9.5...v2.9.6">https://github.com/fluxcd/flux2/compare/v2.9.5...v2.9.6</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/fluxcd/flux2/commit/b9c17924adb533d3617ec7de97a7b0f4acc07b39"><code>b9c1792</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6097">#6097</a> from fluxcd/update-components-release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/847c02bb967a9021af601762cefab103a01acbd6"><code>847c02b</code></a> Update toolkit components</li> <li><a href="https://github.com/fluxcd/flux2/commit/5156dee7c62dde24752a3317dbdf6e089e6e15eb"><code>5156dee</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6098">#6098</a> from fluxcd/update-pkg-deps/release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/c2437feed91b522a3d4f607e5c4d08111898b315"><code>c2437fe</code></a> Update fluxcd/pkg dependencies</li> <li><a href="https://github.com/fluxcd/flux2/commit/0a66b4a91da048b159f2c1c925013922ed4c4e1c"><code>0a66b4a</code></a> Merge pull request <a href="https://redirect.github.com/fluxcd/flux2/issues/6081">#6081</a> from fluxcd/backport-6074-to-release/v2.9.x</li> <li><a href="https://github.com/fluxcd/flux2/commit/d3ab1f61604076f8bda82e7f3cab93db249e0711"><code>d3ab1f6</code></a> Format reproducible created timestamp in UTC</li> <li>See full diff in <a href="https://github.com/fluxcd/flux2/compare/dd233c4fadef306a62b7893204f8e3817fecc2b2...b9c17924adb533d3617ec7de97a7b0f4acc07b39">compare view</a></li> </ul> </details> <br /> Updates `linear/linear-release-action` from 0.18.0 to 0.18.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.18.1</h2> <h2>What's Changed</h2> <ul> <li>Support release descriptions in the GitHub Action by <a href="https://github.com/duong-vu"><code>@duong-vu</code></a> in <a href="https://redirect.github.com/linear/linear-release-action/pull/71">linear/linear-release-action#71</a></li> <li>Skip the automatic GitHub token on GitHub Enterprise runners by <a href="https://github.com/RomainCscn"><code>@RomainCscn</code></a> in <a href="https://redirect.github.com/linear/linear-release-action/pull/72">linear/linear-release-action#72</a></li> <li>Verify CLI installs against committed checksums by <a href="https://github.com/RomainCscn"><code>@RomainCscn</code></a> in <a href="https://redirect.github.com/linear/linear-release-action/pull/73">linear/linear-release-action#73</a></li> <li>Release v0.18.1 by <a href="https://github.com/RomainCscn"><code>@RomainCscn</code></a> in <a href="https://redirect.github.com/linear/linear-release-action/pull/74">linear/linear-release-action#74</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/duong-vu"><code>@duong-vu</code></a> made their first contribution in <a href="https://redirect.github.com/linear/linear-release-action/pull/71">linear/linear-release-action#71</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/linear/linear-release-action/compare/v0.18.0...v0.18.1">https://github.com/linear/linear-release-action/compare/v0.18.0...v0.18.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/linear/linear-release-action/commit/30f9ae77461ec29f07fffe0c52edd1909bfbb6f5"><code>30f9ae7</code></a> Release v0.18.1 (<a href="https://redirect.github.com/linear/linear-release-action/issues/74">#74</a>)</li> <li><a href="https://github.com/linear/linear-release-action/commit/8db66b644c0bffd50aaa89b51c8eae0120f94b87"><code>8db66b6</code></a> Verify CLI installs against committed checksums (<a href="https://redirect.github.com/linear/linear-release-action/issues/73">#73</a>)</li> <li><a href="https://github.com/linear/linear-release-action/commit/65ed0ec8b3bdc6823789a0d3f361120d932c54ac"><code>65ed0ec</code></a> Skip the automatic GitHub token on GitHub Enterprise runners (<a href="https://redirect.github.com/linear/linear-release-action/issues/72">#72</a>)</li> <li><a href="https://github.com/linear/linear-release-action/commit/bc513a9e552e26d94d6e885af2f6c02f7a16c800"><code>bc513a9</code></a> Add release description input to action (<a href="https://redirect.github.com/linear/linear-release-action/issues/71">#71</a>)</li> <li>See full diff in <a href="https://github.com/linear/linear-release-action/compare/d4af10092984f9bc6d5efa075b242bdf01333463...30f9ae77461ec29f07fffe0c52edd1909bfbb6f5">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@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.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@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.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@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
|
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@b9c17924adb533d3617ec7de97a7b0f4acc07b39 # v2.9.6
|
|
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
|