mirror of
https://github.com/coder/coder.git
synced 2026-06-03 21:18:24 +00:00
cf370d6d1f
Bumps the github-actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [crate-ci/typos](https://github.com/crate-ci/typos) | `1.29.4` | `1.29.5` | | [google-github-actions/auth](https://github.com/google-github-actions/auth) | `2.1.7` | `2.1.8` | | [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) | `2.1.2` | `2.1.4` | | [google-github-actions/get-gke-credentials](https://github.com/google-github-actions/get-gke-credentials) | `2.3.0` | `2.3.1` | | [github/codeql-action](https://github.com/github/codeql-action) | `3.28.5` | `3.28.8` | Updates `crate-ci/typos` from 1.29.4 to 1.29.5 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/releases">crate-ci/typos's releases</a>.</em></p> <blockquote> <h2>v1.29.5</h2> <h2>[1.29.5] - 2025-01-30</h2> <h3>Internal</h3> <ul> <li>Update a dependency</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's changelog</a>.</em></p> <blockquote> <h1>Change Log</h1> <p>All notable changes to this project will be documented in this file.</p> <p>The format is based on <a href="http://keepachangelog.com/">Keep a Changelog</a> and this project adheres to <a href="http://semver.org/">Semantic Versioning</a>.</p> <!-- raw HTML omitted --> <h2>[Unreleased] - ReleaseDate</h2> <h3>Features</h3> <ul> <li>Updated the dictionary with the <a href="https://redirect.github.com/crate-ci/typos/issues/1200">January 2025</a> changes</li> </ul> <h2>[1.29.5] - 2025-01-30</h2> <h3>Internal</h3> <ul> <li>Update a dependency</li> </ul> <h2>[1.29.4] - 2025-01-03</h2> <h2>[1.29.3] - 2025-01-02</h2> <h2>[1.29.2] - 2025-01-02</h2> <h2>[1.29.1] - 2025-01-02</h2> <h3>Fixes</h3> <ul> <li>Don't correct <code>deriver</code></li> </ul> <h2>[1.29.0] - 2024-12-31</h2> <h3>Features</h3> <ul> <li>Updated the dictionary with the <a href="https://redirect.github.com/crate-ci/typos/issues/1156">December 2024</a> changes</li> </ul> <h3>Performance</h3> <ul> <li>Sped up dictionary lookups</li> </ul> <h2>[1.28.4] - 2024-12-16</h2> <h3>Features</h3> <ul> <li><code>--format sarif</code> support</li> </ul> <h2>[1.28.3] - 2024-12-12</h2> <h3>Fixes</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/crate-ci/typos/commit/11ca4583f2f3f74c7e7785c0ecb20fe2c99a4308"><code>11ca458</code></a> chore: Release</li> <li><a href="https://github.com/crate-ci/typos/commit/99fd37f157f55c0565a0574a86eb3949dbd38165"><code>99fd37f</code></a> docs: Update changelog</li> <li><a href="https://github.com/crate-ci/typos/commit/4f604f6effffe7f41833b65ee75da75d416821ef"><code>4f604f6</code></a> Merge pull request <a href="https://redirect.github.com/crate-ci/typos/issues/1220">#1220</a> from epage/w7</li> <li><a href="https://github.com/crate-ci/typos/commit/ba04a1a0fd67a0e00ad36c5c5655b9740ee5e68a"><code>ba04a1a</code></a> perf: Remove ErrMode overhead</li> <li><a href="https://github.com/crate-ci/typos/commit/60452b5a81caa4f70c81282f2cdd2116fc045f52"><code>60452b5</code></a> chore: Update to Winnow 0.7</li> <li><a href="https://github.com/crate-ci/typos/commit/4c22f194b5c24cf2b7d0524df0857f0f8bbc32a5"><code>4c22f19</code></a> refactor: Migrate from Parser to ModalParser</li> <li><a href="https://github.com/crate-ci/typos/commit/7830eb8730de84bf14bc14cadb996c0e52f9fe93"><code>7830eb8</code></a> refactor: Resolve deprecations</li> <li><a href="https://github.com/crate-ci/typos/commit/07f1292e290f35153fb91dad3324e7bdb9cd827a"><code>07f1292</code></a> chore: Upgrade to Winnow 0.6.26</li> <li><a href="https://github.com/crate-ci/typos/commit/3683264986a72f63f13e9e8fc132a13af2a322b8"><code>3683264</code></a> chore(deps): Update Rust Stable to v1.84 (<a href="https://redirect.github.com/crate-ci/typos/issues/1216">#1216</a>)</li> <li><a href="https://github.com/crate-ci/typos/commit/2ed38e07fc83ec249f9736b81008690c2c88ec98"><code>2ed38e0</code></a> chore(deps): Update Rust crate bstr to v1.11.3 (<a href="https://redirect.github.com/crate-ci/typos/issues/1202">#1202</a>)</li> <li>See full diff in <a href="https://github.com/crate-ci/typos/compare/685eb3d55be2f85191e8c84acb9f44d7756f84ab...11ca4583f2f3f74c7e7785c0ecb20fe2c99a4308">compare view</a></li> </ul> </details> <br /> Updates `google-github-actions/auth` from 2.1.7 to 2.1.8 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google-github-actions/auth/releases">google-github-actions/auth's releases</a>.</em></p> <blockquote> <h2>v2.1.8</h2> <h2>What's Changed</h2> <ul> <li>Update TROUBLESHOOTING.md by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/auth/pull/457">google-github-actions/auth#457</a></li> <li>fix: add runs-on to README.md example by <a href="https://github.com/lbarthon"><code>@lbarthon</code></a> in <a href="https://redirect.github.com/google-github-actions/auth/pull/460">google-github-actions/auth#460</a></li> <li>security: bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/google-github-actions/auth/pull/463">google-github-actions/auth#463</a></li> <li>Update deps by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/auth/pull/466">google-github-actions/auth#466</a></li> <li>Release: v2.1.8 by <a href="https://github.com/google-github-actions-bot"><code>@google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/auth/pull/467">google-github-actions/auth#467</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/lbarthon"><code>@lbarthon</code></a> made their first contribution in <a href="https://redirect.github.com/google-github-actions/auth/pull/460">google-github-actions/auth#460</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/auth/compare/v2...v2.1.8">https://github.com/google-github-actions/auth/compare/v2...v2.1.8</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google-github-actions/auth/commit/71f986410dfbc7added4569d411d040a91dc6935"><code>71f9864</code></a> Release: v2.1.8 (<a href="https://redirect.github.com/google-github-actions/auth/issues/467">#467</a>)</li> <li><a href="https://github.com/google-github-actions/auth/commit/0cd8f2e4e26e94673a192056e2a7f0af77f84889"><code>0cd8f2e</code></a> Update deps (<a href="https://redirect.github.com/google-github-actions/auth/issues/466">#466</a>)</li> <li><a href="https://github.com/google-github-actions/auth/commit/332e0ba72f0d93d01c6f79eff1bd404dc3abddd3"><code>332e0ba</code></a> security: bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group (<a href="https://redirect.github.com/google-github-actions/auth/issues/463">#463</a>)</li> <li><a href="https://github.com/google-github-actions/auth/commit/28d44ba25933bc5bc7f2d69931f8001632c46611"><code>28d44ba</code></a> fix: add runs-on to README.md example (<a href="https://redirect.github.com/google-github-actions/auth/issues/460">#460</a>)</li> <li><a href="https://github.com/google-github-actions/auth/commit/83354cacbb08bb6ced8aa3959623167f377b302e"><code>83354ca</code></a> Update TROUBLESHOOTING.md (<a href="https://redirect.github.com/google-github-actions/auth/issues/457">#457</a>)</li> <li>See full diff in <a href="https://github.com/google-github-actions/auth/compare/6fc4af4b145ae7821d527454aa9bd537d1f2dc5f...71f986410dfbc7added4569d411d040a91dc6935">compare view</a></li> </ul> </details> <br /> Updates `google-github-actions/setup-gcloud` from 2.1.2 to 2.1.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google-github-actions/setup-gcloud/releases">google-github-actions/setup-gcloud's releases</a>.</em></p> <blockquote> <h2>v2.1.4</h2> <h2>What's Changed</h2> <ul> <li>Revert to pinned release workflows by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/706">google-github-actions/setup-gcloud#706</a></li> <li>Release: v2.1.4 by <a href="https://github.com/google-github-actions-bot"><code>@google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/707">google-github-actions/setup-gcloud#707</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/setup-gcloud/compare/v2.1.3...v2.1.4">https://github.com/google-github-actions/setup-gcloud/compare/v2.1.3...v2.1.4</a></p> <h2>v2.1.3</h2> <h2>What's Changed</h2> <ul> <li>Allow manually running integration tests with workflow_dispatch by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/702">google-github-actions/setup-gcloud#702</a></li> <li>security: bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/703">google-github-actions/setup-gcloud#703</a></li> <li>Update deps by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/704">google-github-actions/setup-gcloud#704</a></li> <li>Release: v2.1.3 by <a href="https://github.com/google-github-actions-bot"><code>@google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/setup-gcloud/pull/705">google-github-actions/setup-gcloud#705</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/setup-gcloud/compare/v2...v2.1.3">https://github.com/google-github-actions/setup-gcloud/compare/v2...v2.1.3</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google-github-actions/setup-gcloud/commit/77e7a554d41e2ee56fc945c52dfd3f33d12def9a"><code>77e7a55</code></a> Release: v2.1.4 (<a href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/707">#707</a>)</li> <li><a href="https://github.com/google-github-actions/setup-gcloud/commit/334c6905f38b9e030504ad8d87fbbaa43cdd3586"><code>334c690</code></a> Revert to pinned release workflows (<a href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/706">#706</a>)</li> <li><a href="https://github.com/google-github-actions/setup-gcloud/commit/4111bea454dcfe1b4c2db3753685db043571e112"><code>4111bea</code></a> Release: v2.1.3 (<a href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/705">#705</a>)</li> <li><a href="https://github.com/google-github-actions/setup-gcloud/commit/0c0751a334df96bd97a58506905a494041dfdec0"><code>0c0751a</code></a> Update deps (<a href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/704">#704</a>)</li> <li><a href="https://github.com/google-github-actions/setup-gcloud/commit/ae61ebc56fc846462d0e35972f86f9fb1d30f2e2"><code>ae61ebc</code></a> security: bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group (<a href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/703">#703</a>)</li> <li><a href="https://github.com/google-github-actions/setup-gcloud/commit/25043b08d04e573bd8f468495feb10e6a5715267"><code>25043b0</code></a> Allow manually running integration tests with workflow_dispatch (<a href="https://redirect.github.com/google-github-actions/setup-gcloud/issues/702">#702</a>)</li> <li>See full diff in <a href="https://github.com/google-github-actions/setup-gcloud/compare/6189d56e4096ee891640bb02ac264be376592d6a...77e7a554d41e2ee56fc945c52dfd3f33d12def9a">compare view</a></li> </ul> </details> <br /> Updates `google-github-actions/get-gke-credentials` from 2.3.0 to 2.3.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google-github-actions/get-gke-credentials/releases">google-github-actions/get-gke-credentials's releases</a>.</em></p> <blockquote> <h2>v2.3.1</h2> <h2>What's Changed</h2> <ul> <li>Centralize request logic, turn on retries, and add debug logging by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/323">google-github-actions/get-gke-credentials#323</a></li> <li>security: bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/324">google-github-actions/get-gke-credentials#324</a></li> <li>Update deps by <a href="https://github.com/sethvargo"><code>@sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/325">google-github-actions/get-gke-credentials#325</a></li> <li>Release: v2.3.1 by <a href="https://github.com/google-github-actions-bot"><code>@google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/get-gke-credentials/pull/326">google-github-actions/get-gke-credentials#326</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/get-gke-credentials/compare/v2...v2.3.1">https://github.com/google-github-actions/get-gke-credentials/compare/v2...v2.3.1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google-github-actions/get-gke-credentials/commit/7a108e64ed8546fe38316b4086e91da13f4785e1"><code>7a108e6</code></a> Release: v2.3.1 (<a href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/326">#326</a>)</li> <li><a href="https://github.com/google-github-actions/get-gke-credentials/commit/c5976979eef9961ac6e47fb2f06b958375d5ff33"><code>c597697</code></a> Update deps (<a href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/325">#325</a>)</li> <li><a href="https://github.com/google-github-actions/get-gke-credentials/commit/cb57a88edb5f546e72abe31af937bfcc9b0820b2"><code>cb57a88</code></a> security: bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group (<a href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/324">#324</a>)</li> <li><a href="https://github.com/google-github-actions/get-gke-credentials/commit/b7a282cc9785583100aba279cbe3ab147a4f2cf6"><code>b7a282c</code></a> Centralize request logic, turn on retries, and add debug logging (<a href="https://redirect.github.com/google-github-actions/get-gke-credentials/issues/323">#323</a>)</li> <li>See full diff in <a href="https://github.com/google-github-actions/get-gke-credentials/compare/9025e8f90f2d8e0c3dafc3128cc705a26d992a6a...7a108e64ed8546fe38316b4086e91da13f4785e1">compare view</a></li> </ul> </details> <br /> Updates `github/codeql-action` from 3.28.5 to 3.28.8 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/github/codeql-action/releases">github/codeql-action's releases</a>.</em></p> <blockquote> <h2>v3.28.8</h2> <h1>CodeQL Action Changelog</h1> <p>See the <a href="https://github.com/github/codeql-action/releases">releases page</a> for the relevant changes to the CodeQL CLI and language packs.</p> <h2>3.28.8 - 29 Jan 2025</h2> <ul> <li>Enable support for Kotlin 2.1.10 when running with CodeQL CLI v2.20.3. <a href="https://redirect.github.com/github/codeql-action/pull/2744">#2744</a></li> </ul> <p>See the full <a href="https://github.com/github/codeql-action/blob/v3.28.8/CHANGELOG.md">CHANGELOG.md</a> for more information.</p> <h2>v3.28.7</h2> <h1>CodeQL Action Changelog</h1> <p>See the <a href="https://github.com/github/codeql-action/releases">releases page</a> for the relevant changes to the CodeQL CLI and language packs.</p> <h2>3.28.7 - 29 Jan 2025</h2> <p>No user facing changes.</p> <p>See the full <a href="https://github.com/github/codeql-action/blob/v3.28.7/CHANGELOG.md">CHANGELOG.md</a> for more information.</p> <h2>v3.28.6</h2> <h1>CodeQL Action Changelog</h1> <p>See the <a href="https://github.com/github/codeql-action/releases">releases page</a> for the relevant changes to the CodeQL CLI and language packs.</p> <h2>3.28.6 - 27 Jan 2025</h2> <ul> <li>Re-enable debug artifact upload for CLI versions 2.20.3 or greater. <a href="https://redirect.github.com/github/codeql-action/pull/2726">#2726</a></li> </ul> <p>See the full <a href="https://github.com/github/codeql-action/blob/v3.28.6/CHANGELOG.md">CHANGELOG.md</a> for more information.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's changelog</a>.</em></p> <blockquote> <h1>CodeQL Action Changelog</h1> <p>See the <a href="https://github.com/github/codeql-action/releases">releases page</a> for the relevant changes to the CodeQL CLI and language packs.</p> <h2>[UNRELEASED]</h2> <p>No user facing changes.</p> <h2>3.28.8 - 29 Jan 2025</h2> <ul> <li>Enable support for Kotlin 2.1.10 when running with CodeQL CLI v2.20.3. <a href="https://redirect.github.com/github/codeql-action/pull/2744">#2744</a></li> </ul> <h2>3.28.7 - 29 Jan 2025</h2> <p>No user facing changes.</p> <h2>3.28.6 - 27 Jan 2025</h2> <ul> <li>Re-enable debug artifact upload for CLI versions 2.20.3 or greater. <a href="https://redirect.github.com/github/codeql-action/pull/2726">#2726</a></li> </ul> <h2>3.28.5 - 24 Jan 2025</h2> <ul> <li>Update default CodeQL bundle version to 2.20.3. <a href="https://redirect.github.com/github/codeql-action/pull/2717">#2717</a></li> </ul> <h2>3.28.4 - 23 Jan 2025</h2> <p>No user facing changes.</p> <h2>3.28.3 - 22 Jan 2025</h2> <ul> <li>Update default CodeQL bundle version to 2.20.2. <a href="https://redirect.github.com/github/codeql-action/pull/2707">#2707</a></li> <li>Fix an issue downloading the CodeQL Bundle from a GitHub Enterprise Server instance which occurred when the CodeQL Bundle had been synced to the instance using the <a href="https://github.com/github/codeql-action-sync-tool">CodeQL Action sync tool</a> and the Actions runner did not have Zstandard installed. <a href="https://redirect.github.com/github/codeql-action/pull/2710">#2710</a></li> <li>Uploading debug artifacts for CodeQL analysis is temporarily disabled. <a href="https://redirect.github.com/github/codeql-action/pull/2712">#2712</a></li> </ul> <h2>3.28.2 - 21 Jan 2025</h2> <p>No user facing changes.</p> <h2>3.28.1 - 10 Jan 2025</h2> <ul> <li>CodeQL Action v2 is now deprecated, and is no longer updated or supported. For better performance, improved security, and new features, upgrade to v3. For more information, see <a href="https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/">this changelog post</a>. <a href="https://redirect.github.com/github/codeql-action/pull/2677">#2677</a></li> <li>Update default CodeQL bundle version to 2.20.1. <a href="https://redirect.github.com/github/codeql-action/pull/2678">#2678</a></li> </ul> <h2>3.28.0 - 20 Dec 2024</h2> <ul> <li>Bump the minimum CodeQL bundle version to 2.15.5. <a href="https://redirect.github.com/github/codeql-action/pull/2655">#2655</a></li> <li>Don't fail in the unusual case that a file is on the search path. <a href="https://redirect.github.com/github/codeql-action/pull/2660">#2660</a>.</li> </ul> <h2>3.27.9 - 12 Dec 2024</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/github/codeql-action/commit/dd746615b3b9d728a6a37ca2045b68ca76d4841a"><code>dd74661</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/2746">#2746</a> from github/update-v3.28.8-a91a3f767</li> <li><a href="https://github.com/github/codeql-action/commit/3210a3cda6446234a897a079af1b684aa4c73326"><code>3210a3c</code></a> Fix Kotlin version in changelog</li> <li><a href="https://github.com/github/codeql-action/commit/72f9d0296b7b9c91564f67ddf9def81c815ce0c6"><code>72f9d02</code></a> Update changelog for v3.28.8</li> <li><a href="https://github.com/github/codeql-action/commit/a91a3f76789881261b540fb7aa8a527214f8ac01"><code>a91a3f7</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/2744">#2744</a> from github/igfoo/kot2.1.10</li> <li><a href="https://github.com/github/codeql-action/commit/c520fb59d4c28e13147ed378b4c12599df187412"><code>c520fb5</code></a> Merge pull request <a href="https://redirect.github.com/github/codeql-action/issues/2745">#2745</a> from github/mergeback/v3.28.7-to-main-6e545590</li> <li><a href="https://github.com/github/codeql-action/commit/3879c5766041d8b2b7504c5c4b2d6dbd289f7634"><code>3879c57</code></a> Add changelog entry</li> <li><a href="https://github.com/github/codeql-action/commit/0c2193725f360a9b0adcad3a71ce0d9cd4acb219"><code>0c21937</code></a> Run "npm run build"</li> <li><a href="https://github.com/github/codeql-action/commit/5a61bf07fab8324ecda8ebb1d817463b17b717d9"><code>5a61bf0</code></a> Kotlin: The 2.20.3 release supports Kotlin 2.1.10.</li> <li><a href="https://github.com/github/codeql-action/commit/163d1195df65a0e49551cd9b4fa0383e68d64a39"><code>163d119</code></a> Update checked-in dependencies</li> <li><a href="https://github.com/github/codeql-action/commit/bcf5cecbc6b147de017e1841778fa8d8644bf8a2"><code>bcf5cec</code></a> Update changelog and version after v3.28.7</li> <li>Additional commits viewable in <a href="https://github.com/github/codeql-action/compare/f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4...dd746615b3b9d728a6a37ca2045b68ca76d4841a">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 merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@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>
1328 lines
48 KiB
YAML
1328 lines
48 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Cancel in-progress runs for pull requests when developers push
|
|
# additional changes
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }}
|
|
docs: ${{ steps.filter.outputs.docs }}
|
|
go: ${{ steps.filter.outputs.go }}
|
|
ts: ${{ steps.filter.outputs.ts }}
|
|
k8s: ${{ steps.filter.outputs.k8s }}
|
|
ci: ${{ steps.filter.outputs.ci }}
|
|
db: ${{ steps.filter.outputs.db }}
|
|
gomod: ${{ steps.filter.outputs.gomod }}
|
|
offlinedocs-only: ${{ steps.filter.outputs.offlinedocs_count == steps.filter.outputs.all_count }}
|
|
offlinedocs: ${{ steps.filter.outputs.offlinedocs }}
|
|
tailnet-integration: ${{ steps.filter.outputs.tailnet-integration }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
# For pull requests it's not necessary to checkout the code
|
|
- name: check changed files
|
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
all:
|
|
- "**"
|
|
docs:
|
|
- "docs/**"
|
|
- "README.md"
|
|
- "examples/web-server/**"
|
|
- "examples/monitoring/**"
|
|
- "examples/lima/**"
|
|
db:
|
|
- "**.sql"
|
|
- "coderd/database/**"
|
|
go:
|
|
- "**.sql"
|
|
- "**.go"
|
|
- "**.golden"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
# Other non-Go files that may affect Go code:
|
|
- "**.rego"
|
|
- "**.sh"
|
|
- "**.tpl"
|
|
- "**.gotmpl"
|
|
- "**.gotpl"
|
|
- "Makefile"
|
|
- "site/static/error.html"
|
|
# Main repo directories for completeness in case other files are
|
|
# touched:
|
|
- "agent/**"
|
|
- "cli/**"
|
|
- "cmd/**"
|
|
- "coderd/**"
|
|
- "enterprise/**"
|
|
- "examples/**"
|
|
- "helm/**"
|
|
- "provisioner/**"
|
|
- "provisionerd/**"
|
|
- "provisionersdk/**"
|
|
- "pty/**"
|
|
- "scaletest/**"
|
|
- "tailnet/**"
|
|
- "testutil/**"
|
|
gomod:
|
|
- "go.mod"
|
|
- "go.sum"
|
|
ts:
|
|
- "site/**"
|
|
- "Makefile"
|
|
k8s:
|
|
- "helm/**"
|
|
- "scripts/Dockerfile"
|
|
- "scripts/Dockerfile.base"
|
|
- "scripts/helm.sh"
|
|
ci:
|
|
- ".github/actions/**"
|
|
- ".github/workflows/ci.yaml"
|
|
offlinedocs:
|
|
- "offlinedocs/**"
|
|
tailnet-integration:
|
|
- "tailnet/**"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
|
|
- id: debug
|
|
run: |
|
|
echo "${{ toJSON(steps.filter )}}"
|
|
|
|
# Disabled due to instability. See: https://github.com/coder/coder/issues/14553
|
|
# Re-enable once the flake hash calculation is stable.
|
|
# update-flake:
|
|
# needs: changes
|
|
# if: needs.changes.outputs.gomod == 'true'
|
|
# runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
# steps:
|
|
# - name: Checkout
|
|
# uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
# with:
|
|
# fetch-depth: 1
|
|
# # See: https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
|
|
# token: ${{ secrets.CDRCI_GITHUB_TOKEN }}
|
|
|
|
# - name: Setup Go
|
|
# uses: ./.github/actions/setup-go
|
|
|
|
# - name: Update Nix Flake SRI Hash
|
|
# run: ./scripts/update-flake.sh
|
|
|
|
# # auto update flake for dependabot
|
|
# - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
|
|
# if: github.actor == 'dependabot[bot]'
|
|
# with:
|
|
# # Allows dependabot to still rebase!
|
|
# commit_message: "[dependabot skip] Update Nix Flake SRI Hash"
|
|
# commit_user_name: "dependabot[bot]"
|
|
# commit_user_email: "49699333+dependabot[bot]@users.noreply.github.com>"
|
|
# commit_author: "dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>"
|
|
|
|
# # require everyone else to update it themselves
|
|
# - name: Ensure No Changes
|
|
# if: github.actor != 'dependabot[bot]'
|
|
# run: git diff --exit-code
|
|
|
|
lint:
|
|
needs: changes
|
|
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Get golangci-lint cache dir
|
|
run: |
|
|
linter_ver=$(egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/contents/Dockerfile | cut -d '=' -f 2)
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$linter_ver
|
|
dir=$(golangci-lint cache status | awk '/Dir/ { print $2 }')
|
|
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV
|
|
|
|
- name: golangci-lint cache
|
|
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
|
|
with:
|
|
path: |
|
|
${{ env.LINT_CACHE_DIR }}
|
|
key: golangci-lint-${{ runner.os }}-${{ hashFiles('**/*.go') }}
|
|
restore-keys: |
|
|
golangci-lint-${{ runner.os }}-
|
|
|
|
# Check for any typos
|
|
- name: Check for typos
|
|
uses: crate-ci/typos@11ca4583f2f3f74c7e7785c0ecb20fe2c99a4308 # v1.29.5
|
|
with:
|
|
config: .github/workflows/typos.toml
|
|
|
|
- name: Fix the typos
|
|
if: ${{ failure() }}
|
|
run: |
|
|
echo "::notice:: you can automatically fix typos from your CLI:
|
|
cargo install typos-cli
|
|
typos -c .github/workflows/typos.toml -w"
|
|
|
|
# Needed for helm chart linting
|
|
- name: Install helm
|
|
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
|
|
with:
|
|
version: v3.9.2
|
|
|
|
- name: make lint
|
|
run: |
|
|
make --output-sync=line -j lint
|
|
|
|
- name: Check workflow files
|
|
run: |
|
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.4
|
|
./actionlint -color -shellcheck= -ignore "set-output"
|
|
shell: bash
|
|
|
|
- name: Check for unstaged files
|
|
run: |
|
|
rm -f ./actionlint ./typos
|
|
./scripts/check_unstaged.sh
|
|
shell: bash
|
|
|
|
gen:
|
|
timeout-minutes: 8
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
if: always()
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup sqlc
|
|
uses: ./.github/actions/setup-sqlc
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
- name: go install tools
|
|
run: |
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
|
|
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34
|
|
go install golang.org/x/tools/cmd/goimports@latest
|
|
go install github.com/mikefarah/yq/v4@v4.44.3
|
|
go install go.uber.org/mock/mockgen@v0.5.0
|
|
|
|
- name: Install Protoc
|
|
run: |
|
|
mkdir -p /tmp/proto
|
|
pushd /tmp/proto
|
|
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
|
|
unzip protoc.zip
|
|
cp -r ./bin/* /usr/local/bin
|
|
cp -r ./include /usr/local/bin/include
|
|
popd
|
|
|
|
- name: make gen
|
|
# no `-j` flag as `make` fails with:
|
|
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
|
|
run: "make --output-sync -B gen"
|
|
|
|
- name: make update-golden-files
|
|
run: |
|
|
make clean/golden-files
|
|
# Notifications require DB, we could start a DB instance here but
|
|
# let's just restore for now.
|
|
git checkout -- coderd/notifications/testdata/rendered-templates
|
|
# As above, skip `-j` flag.
|
|
make --output-sync -B update-golden-files
|
|
|
|
- name: Check for unstaged files
|
|
run: ./scripts/check_unstaged.sh
|
|
|
|
fmt:
|
|
needs: changes
|
|
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
timeout-minutes: 7
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
# Use default Go version
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Install shfmt
|
|
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0
|
|
|
|
- name: make fmt
|
|
run: |
|
|
export PATH=${PATH}:$(go env GOPATH)/bin
|
|
make --output-sync -j -B fmt
|
|
|
|
- name: Check for unstaged files
|
|
run: ./scripts/check_unstaged.sh
|
|
|
|
test-go:
|
|
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
|
|
needs: changes
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
timeout-minutes: 20
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-2022
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
- name: Test with Mock Database
|
|
id: test
|
|
shell: bash
|
|
run: |
|
|
# if macOS, install google-chrome for scaletests. As another concern,
|
|
# should we really have this kind of external dependency requirement
|
|
# on standard CI?
|
|
if [ "${{ matrix.os }}" == "macos-latest" ]; then
|
|
brew install google-chrome
|
|
fi
|
|
|
|
# By default Go will use the number of logical CPUs, which
|
|
# is a fine default.
|
|
PARALLEL_FLAG=""
|
|
|
|
# macOS will output "The default interactive shell is now zsh"
|
|
# intermittently in CI...
|
|
if [ "${{ matrix.os }}" == "macos-latest" ]; then
|
|
touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
|
|
fi
|
|
export TS_DEBUG_DISCO=true
|
|
gotestsum --junitfile="gotests.xml" --jsonfile="gotests.json" \
|
|
--packages="./..." -- $PARALLEL_FLAG -short -failfast
|
|
|
|
- name: Upload test stats to Datadog
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
uses: ./.github/actions/upload-datadog
|
|
if: success() || failure()
|
|
with:
|
|
api-key: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
# We don't run the full test-suite for Windows & MacOS, so we just run the CLI tests on every PR.
|
|
# We run the test suite in test-go-pg, including CLI.
|
|
test-cli:
|
|
runs-on: ${{ matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
|
|
needs: changes
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- windows-2022
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
|
|
- name: Setup ImDisk
|
|
if: runner.os == 'Windows'
|
|
uses: ./.github/actions/setup-imdisk
|
|
|
|
- name: Test CLI
|
|
env:
|
|
TS_DEBUG_DISCO: "true"
|
|
LC_CTYPE: "en_US.UTF-8"
|
|
LC_ALL: "en_US.UTF-8"
|
|
shell: bash
|
|
run: |
|
|
# By default Go will use the number of logical CPUs, which
|
|
# is a fine default.
|
|
PARALLEL_FLAG=""
|
|
|
|
make test-cli
|
|
|
|
- name: Upload test stats to Datadog
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
uses: ./.github/actions/upload-datadog
|
|
if: success() || failure()
|
|
with:
|
|
api-key: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
test-go-pg:
|
|
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }}
|
|
needs: changes
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
# This timeout must be greater than the timeout set by `go test` in
|
|
# `make test-postgres` to ensure we receive a trace of running
|
|
# goroutines. Setting this to the timeout +5m should work quite well
|
|
# even if some of the preceding steps are slow.
|
|
timeout-minutes: 25
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
# Sets up the ImDisk toolkit for Windows and creates a RAM disk on drive R:.
|
|
- name: Setup ImDisk
|
|
if: runner.os == 'Windows'
|
|
uses: ./.github/actions/setup-imdisk
|
|
|
|
- name: Test with PostgreSQL Database
|
|
env:
|
|
POSTGRES_VERSION: "13"
|
|
TS_DEBUG_DISCO: "true"
|
|
LC_CTYPE: "en_US.UTF-8"
|
|
LC_ALL: "en_US.UTF-8"
|
|
shell: bash
|
|
run: |
|
|
# By default Go will use the number of logical CPUs, which
|
|
# is a fine default.
|
|
PARALLEL_FLAG=""
|
|
|
|
make test-postgres
|
|
|
|
- name: Upload test stats to Datadog
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
uses: ./.github/actions/upload-datadog
|
|
if: success() || failure()
|
|
with:
|
|
api-key: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
# NOTE: this could instead be defined as a matrix strategy, but we want to
|
|
# only block merging if tests on postgres 13 fail. Using a matrix strategy
|
|
# here makes the check in the above `required` job rather complicated.
|
|
test-go-pg-16:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
needs:
|
|
- changes
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
# This timeout must be greater than the timeout set by `go test` in
|
|
# `make test-postgres` to ensure we receive a trace of running
|
|
# goroutines. Setting this to the timeout +5m should work quite well
|
|
# even if some of the preceding steps are slow.
|
|
timeout-minutes: 25
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
- name: Test with PostgreSQL Database
|
|
env:
|
|
POSTGRES_VERSION: "16"
|
|
TS_DEBUG_DISCO: "true"
|
|
run: |
|
|
make test-postgres
|
|
|
|
- name: Upload test stats to Datadog
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
uses: ./.github/actions/upload-datadog
|
|
if: success() || failure()
|
|
with:
|
|
api-key: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
test-go-race:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
|
|
needs: changes
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
timeout-minutes: 25
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
# We run race tests with reduced parallelism because they use more CPU and we were finding
|
|
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
|
|
# short timeouts are used.
|
|
# c.f. discussion on https://github.com/coder/coder/pull/15106
|
|
- name: Run Tests
|
|
run: |
|
|
gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
|
|
|
|
- name: Upload test stats to Datadog
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
uses: ./.github/actions/upload-datadog
|
|
if: always()
|
|
with:
|
|
api-key: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
test-go-race-pg:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
|
|
needs: changes
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
timeout-minutes: 25
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup Terraform
|
|
uses: ./.github/actions/setup-tf
|
|
|
|
# We run race tests with reduced parallelism because they use more CPU and we were finding
|
|
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
|
|
# short timeouts are used.
|
|
# c.f. discussion on https://github.com/coder/coder/pull/15106
|
|
- name: Run Tests
|
|
env:
|
|
POSTGRES_VERSION: "16"
|
|
run: |
|
|
make test-postgres-docker
|
|
DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
|
|
|
|
- name: Upload test stats to Datadog
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
uses: ./.github/actions/upload-datadog
|
|
if: always()
|
|
with:
|
|
api-key: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
# Tailnet integration tests only run when the `tailnet` directory or `go.sum`
|
|
# and `go.mod` are changed. These tests are to ensure we don't add regressions
|
|
# to tailnet, either due to our code or due to updating dependencies.
|
|
#
|
|
# These tests are skipped in the main go test jobs because they require root
|
|
# and mess with networking.
|
|
test-go-tailnet-integration:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
needs: changes
|
|
# Unnecessary to run on main for now
|
|
if: needs.changes.outputs.tailnet-integration == 'true' || needs.changes.outputs.ci == 'true'
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
# Used by some integration tests.
|
|
- name: Install Nginx
|
|
run: sudo apt-get update && sudo apt-get install -y nginx
|
|
|
|
- name: Run Tests
|
|
run: make test-tailnet-integration
|
|
|
|
test-js:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
needs: changes
|
|
if: needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- run: pnpm test:ci --max-workers $(nproc)
|
|
working-directory: site
|
|
|
|
test-e2e:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || 'ubuntu-latest' }}
|
|
needs: changes
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
variant:
|
|
- premium: false
|
|
name: test-e2e
|
|
- premium: true
|
|
name: test-e2e-premium
|
|
# Skip test-e2e on forks as they don't have access to CI secrets
|
|
if: (needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main') && !(github.event.pull_request.head.repo.fork)
|
|
timeout-minutes: 20
|
|
name: ${{ matrix.variant.name }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
# Assume that the checked-in versions are up-to-date
|
|
- run: make gen/mark-fresh
|
|
name: make gen
|
|
|
|
- run: make site/e2e/bin/coder
|
|
name: make coder
|
|
|
|
- run: pnpm build
|
|
env:
|
|
NODE_OPTIONS: ${{ github.repository_owner == 'coder' && '--max_old_space_size=8192' || '' }}
|
|
working-directory: site
|
|
|
|
- run: pnpm playwright:install
|
|
working-directory: site
|
|
|
|
# Run tests that don't require a premium license without a premium license
|
|
- run: pnpm playwright:test --forbid-only --workers 1
|
|
if: ${{ !matrix.variant.premium }}
|
|
env:
|
|
DEBUG: pw:api
|
|
working-directory: site
|
|
|
|
# Run all of the tests with a premium license
|
|
- run: pnpm playwright:test --forbid-only --workers 1
|
|
if: ${{ matrix.variant.premium }}
|
|
env:
|
|
DEBUG: pw:api
|
|
CODER_E2E_LICENSE: ${{ secrets.CODER_E2E_LICENSE }}
|
|
CODER_E2E_REQUIRE_PREMIUM_TESTS: "1"
|
|
working-directory: site
|
|
|
|
- name: Upload Playwright Failed Tests
|
|
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
|
|
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
|
|
with:
|
|
name: failed-test-videos${{ matrix.variant.premium && '-premium' || '' }}
|
|
path: ./site/test-results/**/*.webm
|
|
retention-days: 7
|
|
|
|
- name: Upload pprof dumps
|
|
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
|
|
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
|
|
with:
|
|
name: debug-pprof-dumps${{ matrix.variant.premium && '-premium' || '' }}
|
|
path: ./site/test-results/**/debug-pprof-*.txt
|
|
retention-days: 7
|
|
|
|
chromatic:
|
|
# REMARK: this is only used to build storybook and deploy it to Chromatic.
|
|
runs-on: ubuntu-latest
|
|
needs: changes
|
|
if: needs.changes.outputs.ts == 'true' || needs.changes.outputs.ci == 'true'
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
# Required by Chromatic for build-over-build history, otherwise we
|
|
# only get 1 commit on shallow checkout.
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
# This step is not meant for mainline because any detected changes to
|
|
# storybook snapshots will require manual approval/review in order for
|
|
# the check to pass. This is desired in PRs, but not in mainline.
|
|
- name: Publish to Chromatic (non-mainline)
|
|
if: github.ref != 'refs/heads/main' && github.repository_owner == 'coder'
|
|
uses: chromaui/action@30b6228aa809059d46219e0f556752e8672a7e26 # v11.11.0
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
STORYBOOK: true
|
|
with:
|
|
# Do a fast, testing build for change previews
|
|
buildScriptName: "storybook:ci"
|
|
exitOnceUploaded: true
|
|
# This will prevent CI from failing when Chromatic detects visual changes
|
|
exitZeroOnChanges: true
|
|
# Chromatic states its fine to make this token public. See:
|
|
# https://www.chromatic.com/docs/github-actions#forked-repositories
|
|
projectToken: 695c25b6cb65
|
|
workingDir: "./site"
|
|
storybookBaseDir: "./site"
|
|
# Prevent excessive build runs on minor version changes
|
|
skip: "@(renovate/**|dependabot/**)"
|
|
# Run TurboSnap to trace file dependencies to related stories
|
|
# and tell chromatic to only take snapshots of relevant stories
|
|
onlyChanged: true
|
|
# Avoid uploading single files, because that's very slow
|
|
zip: true
|
|
|
|
# This is a separate step for mainline only that auto accepts and changes
|
|
# instead of holding CI up. Since we squash/merge, this is defensive to
|
|
# avoid the same changeset from requiring review once squashed into
|
|
# main. Chromatic is supposed to be able to detect that we use squash
|
|
# commits, but it's good to be defensive in case, otherwise CI remains
|
|
# infinitely "in progress" in mainline unless we re-review each build.
|
|
- name: Publish to Chromatic (mainline)
|
|
if: github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
|
|
uses: chromaui/action@30b6228aa809059d46219e0f556752e8672a7e26 # v11.11.0
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
STORYBOOK: true
|
|
with:
|
|
autoAcceptChanges: true
|
|
# This will prevent CI from failing when Chromatic detects visual changes
|
|
exitZeroOnChanges: true
|
|
# Do a full build with documentation for mainline builds
|
|
buildScriptName: "storybook:build"
|
|
projectToken: 695c25b6cb65
|
|
workingDir: "./site"
|
|
storybookBaseDir: "./site"
|
|
# Run TurboSnap to trace file dependencies to related stories
|
|
# and tell chromatic to only take snapshots of relevant stories
|
|
onlyChanged: true
|
|
# Avoid uploading single files, because that's very slow
|
|
zip: true
|
|
|
|
offlinedocs:
|
|
name: offlinedocs
|
|
needs: changes
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
if: needs.changes.outputs.offlinedocs == 'true' || needs.changes.outputs.ci == 'true' || needs.changes.outputs.docs == 'true'
|
|
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
# 0 is required here for version.sh to work.
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
with:
|
|
directory: offlinedocs
|
|
|
|
- name: Install Protoc
|
|
run: |
|
|
mkdir -p /tmp/proto
|
|
pushd /tmp/proto
|
|
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
|
|
unzip protoc.zip
|
|
cp -r ./bin/* /usr/local/bin
|
|
cp -r ./include /usr/local/bin/include
|
|
popd
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Install go tools
|
|
run: |
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
|
|
go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.34
|
|
go install golang.org/x/tools/cmd/goimports@latest
|
|
go install github.com/mikefarah/yq/v4@v4.44.3
|
|
go install go.uber.org/mock/mockgen@v0.5.0
|
|
|
|
- name: Setup sqlc
|
|
uses: ./.github/actions/setup-sqlc
|
|
|
|
- name: Format
|
|
run: |
|
|
cd offlinedocs
|
|
pnpm format:check
|
|
|
|
- name: Lint
|
|
run: |
|
|
cd offlinedocs
|
|
pnpm lint
|
|
|
|
- name: Build
|
|
# no `-j` flag as `make` fails with:
|
|
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
|
|
run: |
|
|
make build/coder_docs_"$(./scripts/version.sh)".tgz
|
|
|
|
required:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- fmt
|
|
- lint
|
|
- gen
|
|
- test-go
|
|
- test-go-pg
|
|
- test-go-race
|
|
- test-go-race-pg
|
|
- test-js
|
|
- test-e2e
|
|
- offlinedocs
|
|
- sqlc-vet
|
|
# Allow this job to run even if the needed jobs fail, are skipped or
|
|
# cancelled.
|
|
if: always()
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Ensure required checks
|
|
run: |
|
|
echo "Checking required checks"
|
|
echo "- fmt: ${{ needs.fmt.result }}"
|
|
echo "- lint: ${{ needs.lint.result }}"
|
|
echo "- gen: ${{ needs.gen.result }}"
|
|
echo "- test-go: ${{ needs.test-go.result }}"
|
|
echo "- test-go-pg: ${{ needs.test-go-pg.result }}"
|
|
echo "- test-go-race: ${{ needs.test-go-race.result }}"
|
|
echo "- test-go-race-pg: ${{ needs.test-go-race-pg.result }}"
|
|
echo "- test-js: ${{ needs.test-js.result }}"
|
|
echo "- test-e2e: ${{ needs.test-e2e.result }}"
|
|
echo "- offlinedocs: ${{ needs.offlinedocs.result }}"
|
|
echo
|
|
|
|
# We allow skipped jobs to pass, but not failed or cancelled jobs.
|
|
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
|
|
echo "One of the required checks has failed or has been cancelled"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Required checks have passed"
|
|
|
|
# Builds the dylibs and upload it as an artifact so it can be embedded in the main build
|
|
build-dylib:
|
|
needs: changes
|
|
# We always build the dylibs on Go changes to verify we're not merging unbuildable code,
|
|
# but they need only be signed and uploaded on coder/coder main.
|
|
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup build tools
|
|
run: |
|
|
brew install bash gnu-getopt make
|
|
echo "$(brew --prefix bash)/bin" >> $GITHUB_PATH
|
|
echo "$(brew --prefix gnu-getopt)/bin" >> $GITHUB_PATH
|
|
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Install rcodesign
|
|
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
|
|
run: |
|
|
set -euo pipefail
|
|
wget -O /tmp/rcodesign.tar.gz https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
|
|
sudo tar -xzf /tmp/rcodesign.tar.gz \
|
|
-C /usr/local/bin \
|
|
--strip-components=1 \
|
|
apple-codesign-0.22.0-macos-universal/rcodesign
|
|
rm /tmp/rcodesign.tar.gz
|
|
|
|
- name: Setup Apple Developer certificate and API key
|
|
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
|
|
run: |
|
|
set -euo pipefail
|
|
touch /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
|
|
chmod 600 /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
|
|
echo "$AC_CERTIFICATE_P12_BASE64" | base64 -d > /tmp/apple_cert.p12
|
|
echo "$AC_CERTIFICATE_PASSWORD" > /tmp/apple_cert_password.txt
|
|
echo "$AC_APIKEY_P8_BASE64" | base64 -d > /tmp/apple_apikey.p8
|
|
env:
|
|
AC_CERTIFICATE_P12_BASE64: ${{ secrets.AC_CERTIFICATE_P12_BASE64 }}
|
|
AC_CERTIFICATE_PASSWORD: ${{ secrets.AC_CERTIFICATE_PASSWORD }}
|
|
AC_APIKEY_P8_BASE64: ${{ secrets.AC_APIKEY_P8_BASE64 }}
|
|
|
|
- name: Build dylibs
|
|
run: |
|
|
set -euxo pipefail
|
|
go mod download
|
|
|
|
make gen/mark-fresh
|
|
make build/coder-dylib
|
|
env:
|
|
CODER_SIGN_DARWIN: ${{ github.ref == 'refs/heads/main' && '1' || '0' }}
|
|
AC_CERTIFICATE_FILE: /tmp/apple_cert.p12
|
|
AC_CERTIFICATE_PASSWORD_FILE: /tmp/apple_cert_password.txt
|
|
|
|
- name: Upload build artifacts
|
|
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
|
with:
|
|
name: dylibs
|
|
path: |
|
|
./build/*.h
|
|
./build/*.dylib
|
|
retention-days: 7
|
|
|
|
- name: Delete Apple Developer certificate and API key
|
|
if: ${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
|
|
run: rm -f /tmp/{apple_cert.p12,apple_cert_password.txt,apple_apikey.p8}
|
|
|
|
build:
|
|
# This builds and publishes ghcr.io/coder/coder-preview:main for each commit
|
|
# to main branch.
|
|
needs:
|
|
- changes
|
|
- build-dylib
|
|
if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-22.04' }}
|
|
permissions:
|
|
packages: write # Needed to push images to ghcr.io
|
|
env:
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
outputs:
|
|
IMAGE: ghcr.io/coder/coder-preview:${{ steps.build-docker.outputs.tag }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: GHCR Login
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Install nfpm
|
|
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.35.1
|
|
|
|
- name: Install zstd
|
|
run: sudo apt-get install -y zstd
|
|
|
|
- name: Download dylibs
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
with:
|
|
name: dylibs
|
|
path: ./build
|
|
|
|
- name: Insert dylibs
|
|
run: |
|
|
mv ./build/*amd64.dylib ./site/out/bin/coder-vpn-darwin-amd64.dylib
|
|
mv ./build/*arm64.dylib ./site/out/bin/coder-vpn-darwin-arm64.dylib
|
|
mv ./build/*arm64.h ./site/out/bin/coder-vpn-darwin-dylib.h
|
|
|
|
- name: Build
|
|
run: |
|
|
set -euxo pipefail
|
|
go mod download
|
|
|
|
version="$(./scripts/version.sh)"
|
|
tag="main-$(echo "$version" | sed 's/+/-/g')"
|
|
echo "tag=$tag" >> $GITHUB_OUTPUT
|
|
|
|
make gen/mark-fresh
|
|
make -j \
|
|
build/coder_linux_{amd64,arm64,armv7} \
|
|
build/coder_"$version"_windows_amd64.zip \
|
|
build/coder_"$version"_linux_amd64.{tar.gz,deb}
|
|
|
|
- name: Build Linux Docker images
|
|
id: build-docker
|
|
env:
|
|
CODER_IMAGE_BASE: ghcr.io/coder/coder-preview
|
|
CODER_IMAGE_TAG_PREFIX: main
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
run: |
|
|
set -euxo pipefail
|
|
|
|
# build Docker images for each architecture
|
|
version="$(./scripts/version.sh)"
|
|
tag="main-$(echo "$version" | sed 's/+/-/g')"
|
|
echo "tag=$tag" >> $GITHUB_OUTPUT
|
|
|
|
# build images for each architecture
|
|
# note: omitting the -j argument to avoid race conditions when pushing
|
|
make build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
|
|
|
|
# only push if we are on main branch
|
|
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
|
# build and push multi-arch manifest, this depends on the other images
|
|
# being pushed so will automatically push them
|
|
# note: omitting the -j argument to avoid race conditions when pushing
|
|
make push/build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
|
|
|
|
# Define specific tags
|
|
tags=("$tag" "main" "latest")
|
|
|
|
# Create and push a multi-arch manifest for each tag
|
|
# we are adding `latest` tag and keeping `main` for backward
|
|
# compatibality
|
|
for t in "${tags[@]}"; do
|
|
./scripts/build_docker_multiarch.sh \
|
|
--push \
|
|
--target "ghcr.io/coder/coder-preview:$t" \
|
|
--version $version \
|
|
$(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
|
|
done
|
|
fi
|
|
|
|
- name: Prune old images
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: vlaurin/action-ghcr-prune@0cf7d39f88546edd31965acba78cdcb0be14d641 # v0.6.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
organization: coder
|
|
container: coder-preview
|
|
keep-younger-than: 7 # days
|
|
keep-tags: latest
|
|
keep-tags-regexes: ^pr
|
|
prune-tags-regexes: |
|
|
^main-
|
|
^v
|
|
prune-untagged: true
|
|
|
|
- name: Upload build artifacts
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
|
|
with:
|
|
name: coder
|
|
path: |
|
|
./build/*.zip
|
|
./build/*.tar.gz
|
|
./build/*.deb
|
|
retention-days: 7
|
|
|
|
deploy:
|
|
name: "deploy"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs:
|
|
- changes
|
|
- build
|
|
if: |
|
|
github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
|
|
&& needs.changes.outputs.docs-only == 'false'
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Authenticate to Google Cloud
|
|
uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
|
|
with:
|
|
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
|
|
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
|
|
|
|
- name: Set up Google Cloud SDK
|
|
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
|
|
|
|
- name: Set up Flux CLI
|
|
uses: fluxcd/flux2/action@5350425cdcd5fa015337e09fa502153c0275bd4b # v2.4.0
|
|
with:
|
|
# Keep this and the github action up to date with the version of flux installed in dogfood cluster
|
|
version: "2.2.1"
|
|
|
|
- name: Get Cluster Credentials
|
|
uses: google-github-actions/get-gke-credentials@7a108e64ed8546fe38316b4086e91da13f4785e1 # v2.3.1
|
|
with:
|
|
cluster_name: dogfood-v2
|
|
location: us-central1-a
|
|
project_id: coder-dogfood-v2
|
|
|
|
- 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
|
|
|
|
# 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
|
|
|
|
deploy-wsproxies:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup flyctl
|
|
uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # v1.5
|
|
|
|
- name: Deploy workspace proxies
|
|
run: |
|
|
flyctl deploy --image "$IMAGE" --app paris-coder --config ./.github/fly-wsproxies/paris-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_PARIS" --yes
|
|
flyctl deploy --image "$IMAGE" --app sydney-coder --config ./.github/fly-wsproxies/sydney-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_SYDNEY" --yes
|
|
flyctl deploy --image "$IMAGE" --app sao-paulo-coder --config ./.github/fly-wsproxies/sao-paulo-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_SAO_PAULO" --yes
|
|
flyctl deploy --image "$IMAGE" --app jnb-coder --config ./.github/fly-wsproxies/jnb-coder.toml --env "CODER_PROXY_SESSION_TOKEN=$TOKEN_JNB" --yes
|
|
env:
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
IMAGE: ${{ needs.build.outputs.IMAGE }}
|
|
TOKEN_PARIS: ${{ secrets.FLY_PARIS_CODER_PROXY_SESSION_TOKEN }}
|
|
TOKEN_SYDNEY: ${{ secrets.FLY_SYDNEY_CODER_PROXY_SESSION_TOKEN }}
|
|
TOKEN_SAO_PAULO: ${{ secrets.FLY_SAO_PAULO_CODER_PROXY_SESSION_TOKEN }}
|
|
TOKEN_JNB: ${{ secrets.FLY_JNB_CODER_PROXY_SESSION_TOKEN }}
|
|
|
|
# sqlc-vet runs a postgres docker container, runs Coder migrations, and then
|
|
# runs sqlc-vet to ensure all queries are valid. This catches any mistakes
|
|
# in migrations or sqlc queries that makes a query unable to be prepared.
|
|
sqlc-vet:
|
|
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
|
|
needs: changes
|
|
if: needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
with:
|
|
fetch-depth: 1
|
|
# We need golang to run the migration main.go
|
|
- name: Setup Go
|
|
uses: ./.github/actions/setup-go
|
|
|
|
- name: Setup sqlc
|
|
uses: ./.github/actions/setup-sqlc
|
|
|
|
- name: Setup and run sqlc vet
|
|
run: |
|
|
make sqlc-vet
|
|
|
|
notify-slack-on-failure:
|
|
needs:
|
|
- required
|
|
runs-on: ubuntu-latest
|
|
if: failure() && github.ref == 'refs/heads/main'
|
|
|
|
steps:
|
|
- name: Send Slack notification
|
|
run: |
|
|
curl -X POST -H 'Content-type: application/json' \
|
|
--data '{
|
|
"blocks": [
|
|
{
|
|
"type": "header",
|
|
"text": {
|
|
"type": "plain_text",
|
|
"text": "❌ CI Failure in main",
|
|
"emoji": true
|
|
}
|
|
},
|
|
{
|
|
"type": "section",
|
|
"fields": [
|
|
{
|
|
"type": "mrkdwn",
|
|
"text": "*Workflow:*\n${{ github.workflow }}"
|
|
},
|
|
{
|
|
"type": "mrkdwn",
|
|
"text": "*Committer:*\n${{ github.actor }}"
|
|
},
|
|
{
|
|
"type": "mrkdwn",
|
|
"text": "*Commit:*\n${{ github.sha }}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "section",
|
|
"text": {
|
|
"type": "mrkdwn",
|
|
"text": "*View failure:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>"
|
|
}
|
|
}
|
|
]
|
|
}' ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }}
|