Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 3.0.0 to 4.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/goreleaser/goreleaser-action/releases">goreleaser/goreleaser-action's releases</a>.</em></p> <blockquote> <h2>v4.2.0</h2> <h2>What's Changed</h2> <ul> <li>fix: don't depend on the GitHub API to check release by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/391">goreleaser/goreleaser-action#391</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v4.1.1...v4.2.0">https://github.com/goreleaser/goreleaser-action/compare/v4.1.1...v4.2.0</a></p> <h2>v4.1.1</h2> <h2>What's Changed</h2> <ul> <li>Update Readme to reference <code>goreleaser/goreleaser-action@v4</code> by <a href="https://github.com/felladrin"><code>@felladrin</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/384">goreleaser/goreleaser-action#384</a></li> <li>docs: fix README badge by <a href="https://github.com/dirien"><code>@dirien</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/386">goreleaser/goreleaser-action#386</a></li> <li>chore(deps): bump json5 from 2.2.0 to 2.2.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/388">goreleaser/goreleaser-action#388</a></li> <li>fix: use <code>@action/github</code> by <a href="https://github.com/caarlos0"><code>@caarlos0</code></a> and <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/390">goreleaser/goreleaser-action#390</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/felladrin"><code>@felladrin</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/384">goreleaser/goreleaser-action#384</a></li> <li><a href="https://github.com/dirien"><code>@dirien</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/386">goreleaser/goreleaser-action#386</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v4.1.0...v4.1.1">https://github.com/goreleaser/goreleaser-action/compare/v4.1.0...v4.1.1</a></p> <h2>v4.1.0</h2> <h2>What's Changed</h2> <ul> <li>feat!: remove auto-snapshot on dirty tag by <a href="https://github.com/caarlos0"><code>@caarlos0</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/382">goreleaser/goreleaser-action#382</a></li> <li>docs: add example when using workdir along with upload-artifact by <a href="https://github.com/zdtsw"><code>@zdtsw</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/366">goreleaser/goreleaser-action#366</a></li> <li>Fix Self-Hosted Windows Error: Expand-Archive by <a href="https://github.com/flarco"><code>@flarco</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/379">goreleaser/goreleaser-action#379</a></li> <li>chore(deps): bump minimatch from 3.0.4 to 3.1.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/383">goreleaser/goreleaser-action#383</a></li> </ul> <h2>Migrating from v3</h2> <p>If you need the auto-snapshot feature, take a look at <a href="https://github.com/caarlos0/goreleaser-action-v4-auto-snapshot-example">this example repository</a>: it's a minimal working example with all you need.</p> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/zdtsw"><code>@zdtsw</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/366">goreleaser/goreleaser-action#366</a></li> <li><a href="https://github.com/flarco"><code>@flarco</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/379">goreleaser/goreleaser-action#379</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v4...v4.1.0">https://github.com/goreleaser/goreleaser-action/compare/v4...v4.1.0</a></p> <h2>v4.0.0</h2> <h2>What's Changed</h2> <ul> <li>fix: do not override GORELEASER_CURRENT_TAG by <a href="https://github.com/caarlos0"><code>@caarlos0</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/370">goreleaser/goreleaser-action#370</a></li> </ul> <h2>Migrating from v3</h2> <p>If you need the auto-snapshot feature, take a look at <a href="https://github.com/caarlos0/goreleaser-action-v4-auto-snapshot-example">this example repository</a>: it's a minimal working example with all you need.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v3...v4.0.0">https://github.com/goreleaser/goreleaser-action/compare/v3...v4.0.0</a></p> <h2>v3.2.0</h2> <h2>What's Changed</h2> <ul> <li>chore: remove workaround for <code>setOutput</code> by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/374">#374</a>)</li> <li>chore(deps): bump <code>@actions/core</code> from 1.9.1 to 1.10.0 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/372">#372</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|---|---|---|
| .. | ||
| config | ||
| build-and-push-fleetctl-docker.yml | ||
| build-binaries.yaml | ||
| build-orbit.yaml | ||
| codeql-analysis.yml | ||
| deploy-fleet-website.yml | ||
| docs.yml | ||
| dogfood-deploy.yml | ||
| fleet-and-orbit.yml | ||
| fleetctl-preview-latest.yml | ||
| fleetctl-preview.yml | ||
| generate-desktop-targets.yml | ||
| generate-nudge-targets.yml | ||
| generate-osqueryd-targets.yml | ||
| golangci-lint.yml | ||
| goreleaser-fleet.yaml | ||
| goreleaser-orbit.yaml | ||
| goreleaser-snapshot-fleet.yaml | ||
| integration.yml | ||
| pr-helm.yaml | ||
| push-osquery-perf-to-ecr.yml | ||
| README.md | ||
| release-helm.yaml | ||
| scorecards-analysis.yml | ||
| test-db-changes.yml | ||
| test-go.yaml | ||
| test-native-tooling-packaging.yml | ||
| test-packaging.yml | ||
| test-website.yml | ||
| test.yml | ||
| tfsec.yml | ||
| tfvalidate.yml | ||
| trivy_scan.yml | ||
| update-certs.yml | ||
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.