fleet/.github/workflows
dependabot[bot] fdc55aabc4
Bump actions/cache from 3.0.8 to 3.2.6 (#10268)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to
3.2.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/releases">actions/cache's
releases</a>.</em></p>
<blockquote>
<h2>v3.2.6</h2>
<h2>What's Changed</h2>
<ul>
<li>Updated branch in Force deletion of caches by <a
href="https://github.com/t-dedah"><code>@​t-dedah</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1108">actions/cache#1108</a></li>
<li>Fix zstd not being used after zstd version upgrade to 1.5.4 on
hosted runners by <a
href="https://github.com/pdotl"><code>@​pdotl</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1118">actions/cache#1118</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v3.2.6">https://github.com/actions/cache/compare/v3...v3.2.6</a></p>
<h2>v3.2.5</h2>
<h2>What's Changed</h2>
<ul>
<li>Rewrite readmes by <a
href="https://github.com/jsoref"><code>@​jsoref</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1085">actions/cache#1085</a></li>
<li>Fixed typos and formatting in docs by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1076">actions/cache#1076</a></li>
<li>Fixing paths for OSes by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1101">actions/cache#1101</a></li>
<li>Release patch version update by <a
href="https://github.com/Phantsure"><code>@​Phantsure</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1105">actions/cache#1105</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/jsoref"><code>@​jsoref</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1085">actions/cache#1085</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v3.2.5">https://github.com/actions/cache/compare/v3...v3.2.5</a></p>
<h2>v3.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Update json5 package version by <a
href="https://github.com/vsvipul"><code>@​vsvipul</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1065">actions/cache#1065</a></li>
<li>Cache recipes for cache, restore and save actions by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1055">actions/cache#1055</a></li>
<li>Add gnu tar and zstd as pre-requisites for windows self-hosted
runners by <a href="https://github.com/pdotl"><code>@​pdotl</code></a>
in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1068">actions/cache#1068</a></li>
<li>Fix a whitespace typo by <a
href="https://github.com/kurtmckee"><code>@​kurtmckee</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1074">actions/cache#1074</a></li>
<li>📝 <a
href="https://github-redirect.dependabot.com/actions/cache/issues/1045">#1045</a>
update using the <code>set-output</code> command is deprecated by <a
href="https://github.com/siguikesse"><code>@​siguikesse</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1046">actions/cache#1046</a></li>
<li>Fix referenced output key in save action readme by <a
href="https://github.com/ruudk"><code>@​ruudk</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1061">actions/cache#1061</a></li>
<li>Update workflows to use reusable-workflows by <a
href="https://github.com/jongwooo"><code>@​jongwooo</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1066">actions/cache#1066</a></li>
<li>Introduce add-to-project step &amp; rename workflow files by <a
href="https://github.com/pallavx"><code>@​pallavx</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1077">actions/cache#1077</a></li>
<li>chore: Fix syntax error typo by <a
href="https://github.com/vHeemstra"><code>@​vHeemstra</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1081">actions/cache#1081</a></li>
<li>Update caching-strategies.md by <a
href="https://github.com/kpfleming"><code>@​kpfleming</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1084">actions/cache#1084</a></li>
<li>Added another usage hint to foresee <a
href="https://github-redirect.dependabot.com/actions/cache/issues/1072">#1072</a>
by <a href="https://github.com/maybeec"><code>@​maybeec</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1089">actions/cache#1089</a></li>
<li>Add <code>fail-on-cache-miss</code> option by <a
href="https://github.com/cdce8p"><code>@​cdce8p</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1036">actions/cache#1036</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/kurtmckee"><code>@​kurtmckee</code></a>
made their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1074">actions/cache#1074</a></li>
<li><a
href="https://github.com/siguikesse"><code>@​siguikesse</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1046">actions/cache#1046</a></li>
<li><a href="https://github.com/ruudk"><code>@​ruudk</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1061">actions/cache#1061</a></li>
<li><a href="https://github.com/pallavx"><code>@​pallavx</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1077">actions/cache#1077</a></li>
<li><a href="https://github.com/vHeemstra"><code>@​vHeemstra</code></a>
made their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1081">actions/cache#1081</a></li>
<li><a href="https://github.com/kpfleming"><code>@​kpfleming</code></a>
made their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1084">actions/cache#1084</a></li>
<li><a href="https://github.com/maybeec"><code>@​maybeec</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1089">actions/cache#1089</a></li>
<li><a href="https://github.com/cdce8p"><code>@​cdce8p</code></a> made
their first contribution in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1036">actions/cache#1036</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v3...v3.2.4">https://github.com/actions/cache/compare/v3...v3.2.4</a></p>
<h2>v3.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Add Mint example by <a
href="https://github.com/uhooi"><code>@​uhooi</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1051">actions/cache#1051</a></li>
<li>Fixed broken link by <a
href="https://github.com/kotewar"><code>@​kotewar</code></a> in <a
href="https://github-redirect.dependabot.com/actions/cache/pull/1057">actions/cache#1057</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's
changelog</a>.</em></p>
<blockquote>
<h1>Releases</h1>
<h3>3.0.0</h3>
<ul>
<li>Updated minimum runner version support from node 12 -&gt; node
16</li>
</ul>
<h3>3.0.1</h3>
<ul>
<li>Added support for caching from GHES 3.5.</li>
<li>Fixed download issue for files &gt; 2GB during restore.</li>
</ul>
<h3>3.0.2</h3>
<ul>
<li>Added support for dynamic cache size cap on GHES.</li>
</ul>
<h3>3.0.3</h3>
<ul>
<li>Fixed avoiding empty cache save when no files are available for
caching. (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/624">issue</a>)</li>
</ul>
<h3>3.0.4</h3>
<ul>
<li>Fixed tar creation error while trying to create tar with path as
<code>~/</code> home folder on <code>ubuntu-latest</code>. (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/689">issue</a>)</li>
</ul>
<h3>3.0.5</h3>
<ul>
<li>Removed error handling by consuming actions/cache 3.0 toolkit, Now
cache server error handling will be done by toolkit. (<a
href="https://github-redirect.dependabot.com/actions/cache/pull/834">PR</a>)</li>
</ul>
<h3>3.0.6</h3>
<ul>
<li>Fixed <a
href="https://github-redirect.dependabot.com/actions/cache/issues/809">#809</a>
- zstd -d: no such file or directory error</li>
<li>Fixed <a
href="https://github-redirect.dependabot.com/actions/cache/issues/833">#833</a>
- cache doesn't work with github workspace directory</li>
</ul>
<h3>3.0.7</h3>
<ul>
<li>Fixed <a
href="https://github-redirect.dependabot.com/actions/cache/issues/810">#810</a>
- download stuck issue. A new timeout is introduced in the download
process to abort the download if it gets stuck and doesn't finish within
an hour.</li>
</ul>
<h3>3.0.8</h3>
<ul>
<li>Fix zstd not working for windows on gnu tar in issues <a
href="https://github-redirect.dependabot.com/actions/cache/issues/888">#888</a>
and <a
href="https://github-redirect.dependabot.com/actions/cache/issues/891">#891</a>.</li>
<li>Allowing users to provide a custom timeout as input for aborting
download of a cache segment using an environment variable
<code>SEGMENT_DOWNLOAD_TIMEOUT_MINS</code>. Default is 60 minutes.</li>
</ul>
<h3>3.0.9</h3>
<ul>
<li>Enhanced the warning message for cache unavailablity in case of
GHES.</li>
</ul>
<h3>3.0.10</h3>
<ul>
<li>Fix a bug with sorting inputs.</li>
<li>Update definition for restore-keys in README.md</li>
</ul>
<h3>3.0.11</h3>
<ul>
<li>Update toolkit version to 3.0.5 to include
<code>@actions/core@^1.10.0</code></li>
<li>Update <code>@actions/cache</code> to use updated
<code>saveState</code> and <code>setOutput</code> functions from
<code>@actions/core@^1.10.0</code></li>
</ul>
<h3>3.1.0-beta.1</h3>
<ul>
<li>Update <code>@actions/cache</code> on windows to use gnu tar and
zstd by default and fallback to bsdtar and zstd if gnu tar is not
available. (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/984">issue</a>)</li>
</ul>
<h3>3.1.0-beta.2</h3>
<ul>
<li>Added support for fallback to gzip to restore old caches on
windows.</li>
</ul>
<h3>3.1.0-beta.3</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="69d9d449ac"><code>69d9d44</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/actions/cache/issues/1118">#1118</a>
from actions/pdotl/zstd-hotfix</li>
<li><a
href="8d3a1e02aa"><code>8d3a1e0</code></a>
Fix license</li>
<li><a
href="b1db4b4897"><code>b1db4b4</code></a>
Fix zstd breaking after new version release</li>
<li><a
href="7d4d6f7ffd"><code>7d4d6f7</code></a>
Update package-lock.json</li>
<li><a
href="8f7fa5d715"><code>8f7fa5d</code></a>
Bump <code>@​actions/cache</code> version</li>
<li><a
href="95b455a0fb"><code>95b455a</code></a>
3.2.6</li>
<li><a
href="81b7281936"><code>81b7281</code></a>
Updated branch in Force deletion of caches (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/1108">#1108</a>)</li>
<li><a
href="6998d139dd"><code>6998d13</code></a>
Release patch version update (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/1105">#1105</a>)</li>
<li><a
href="2b8105bdae"><code>2b8105b</code></a>
Fixing paths for OSes (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/1101">#1101</a>)</li>
<li><a
href="e08330827d"><code>e083308</code></a>
Fixed typos and formatting in docs (<a
href="https://github-redirect.dependabot.com/actions/cache/issues/1076">#1076</a>)</li>
<li>Additional commits viewable in <a
href="fd5de65bc8...69d9d449ac">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=3.0.8&new-version=3.2.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 13:51:13 -08:00
..
config set default shell in workflows (#8108) 2022-10-07 09:43:56 -06:00
build-and-push-fleetctl-docker.yml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
build-binaries.yaml Bump actions/cache from 3.0.8 to 3.2.6 (#10268) 2023-03-02 13:51:13 -08:00
build-orbit.yaml Remove contents:write from build-orbit action (#10156) 2023-02-27 19:51:43 -08:00
codeql-analysis.yml Bump github/codeql-action from 2.1.21 to 2.2.5 (#10220) 2023-03-01 11:39:55 -08:00
deploy-fleet-website.yml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
docs.yml add concurrency to ci (#8271) 2022-10-24 14:01:00 -06:00
dogfood-deploy.yml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
fleet-and-orbit.yml Windows installer now ensures that legacy osquery installations gets removed during clean install (#9048) 2022-12-19 16:06:44 -08:00
fleetctl-preview-latest.yml Update go to 1.19.4 (#8945) 2022-12-09 11:47:17 -03:00
fleetctl-preview.yml Notify Go and Integration CI failures to new channel (#10235) 2023-03-01 20:14:07 -03:00
generate-desktop-targets.yml Update go to 1.19.4 (#8945) 2022-12-09 11:47:17 -03:00
generate-nudge-targets.yml Generate Nudge targets in CI (#9845) 2023-02-20 09:23:56 -08:00
generate-osqueryd-targets.yml Generate targets for osqueryd 5.8.1 (#10245) 2023-03-01 17:51:15 -08:00
golangci-lint.yml Fix golangci-lint issue and run Github action on all OSs (#9944) 2023-02-21 14:30:45 -03:00
goreleaser-fleet.yaml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
goreleaser-orbit.yaml Update Orbit to use CGO on Linux (#9846) 2023-02-21 18:49:13 -08:00
goreleaser-snapshot-fleet.yaml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
integration.yml Notify Go and Integration CI failures to new channel (#10235) 2023-03-01 20:14:07 -03:00
pr-helm.yaml add concurrency to ci (#8271) 2022-10-24 14:01:00 -06:00
push-osquery-perf-to-ecr.yml Bump aws-actions/amazon-ecr-login from 1.5.0 to 1.5.3 (#8507) 2023-02-27 18:15:16 -08:00
README.md add concurrency to ci (#8271) 2022-10-24 14:01:00 -06:00
release-helm.yaml Bump stefanprodan/helm-gh-pages from 1.5.0 to 1.7.0 (#8804) 2023-02-27 18:17:32 -08:00
scorecards-analysis.yml Update OSSF Scorecards action (#10255) 2023-03-02 09:14:42 -08:00
test-db-changes.yml Update go to 1.19.4 (#8945) 2022-12-09 11:47:17 -03:00
test-go.yaml Notify Go and Integration CI failures to new channel (#10235) 2023-03-01 20:14:07 -03:00
test-native-tooling-packaging.yml Update go to 1.19.4 (#8945) 2022-12-09 11:47:17 -03:00
test-packaging.yml Update go to 1.19.4 (#8945) 2022-12-09 11:47:17 -03:00
test-website.yml Website: fix failing GitHub workflows (#9285) 2023-01-11 13:31:20 -06:00
test.yml Bump actions/cache from 3.0.8 to 3.2.6 (#10268) 2023-03-02 13:51:13 -08:00
tfsec.yml Bump github/codeql-action from 2.1.21 to 2.2.5 (#10220) 2023-03-01 11:39:55 -08:00
tfvalidate.yml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
trivy_scan.yml Pin actions to commit SHA (#10204) 2023-02-28 17:55:38 -08:00
update-certs.yml add concurrency to ci (#8271) 2022-10-24 14:01:00 -06:00

Github Actions

Fleet uses Github Actions for continuous integration (CI). This document describes best practices and at patterns for writing and maintaining Fleet's Github Actions workflows.

Bash

By default, Github Actions sets the shell to bash -e for linux and MacOS runners. To help write safer bash scripts in run jobs and avoid common issues, override the default by adding the following to the workflow file

defaults:
  run:
    # fail-fast using bash -eo pipefail. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
    shell: bash

By specifying the default shell to bash, some extra flags are set. The option pipefail changes the behaviour when using the pipe | operator such that if any command in a pipeline fails, that commands return code will be used a the return code for the whole pipeline. Consider the following example in test-go.yaml

    - name: Run Go Tests
      run: |
        # omitted ...
          make test-go 2>&1 | tee /tmp/gotest.log

If the pipefail option was not set, this job would always succeed because tee would always return success. This is not the intended behavior. Instead, we want the job to fail if make test-go fails.

Concurrency

Github Action runners are limited. If a lot of workflows are queued, they will wait in pending until a runner becomes available. This has caused issue in the past where workflows take an excessively long time to start. To help with this issue, use the following in workflows

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id}}
  cancel-in-progress: true

When a workflow is triggered via a pull request, it will cancel previous running workflows for that pull request. This is especially useful when changes are pushed to a pull request frequently. Manually triggered workflows, workflows that run on a schedule, and workflows triggered by pushes to main are unaffected.