0ef74017ea
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.0.0 to 2.1.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/docker/login-action/releases">docker/login-action's releases</a>.</em></p> <blockquote> <h2>v2.1.0</h2> <h2>What's Changed</h2> <ul> <li>Ensure AWS temp credentials are redacted in workflow logs by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/275">#275</a>)</li> <li>Bump <code>@actions/core</code> from 1.6.0 to 1.10.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/252">#252</a> <a href="https://github-redirect.dependabot.com/docker/login-action/issues/292">#292</a>)</li> <li>Bump <code>@aws-sdk/client-ecr</code> from 3.53.0 to 3.186.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/298">#298</a>)</li> <li>Bump <code>@aws-sdk/client-ecr-public</code> from 3.53.0 to 3.186.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/299">#299</a>)</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/login-action/compare/v2.0.0...v2.1.0">https://github.com/docker/login-action/compare/v2.0.0...v2.1.0</a></p> </blockquote> </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.