fleet/.github/workflows/build-and-push-fleetctl-docker.yml

66 lines
1.9 KiB
YAML
Raw Normal View History

name: Build and push fleetdm/fleetctl Docker image
# Manually trigger this workflow for now
on:
workflow_dispatch:
inputs:
image_tag:
description: 'Docker image tag'
required: true
type: string
# 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
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
permissions:
contents: read
jobs:
docker-push:
runs-on: ubuntu-latest
environment: Docker Hub
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
- name: Login to Docker Hub
Bump docker/login-action from 2.0.0 to 2.1.0 (#10182) 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="https://github.com/docker/login-action/commit/f4ef78c080cd8ba55a85445d5b36e214a81df20a"><code>f4ef78c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/299">#299</a> from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...</li> <li><a href="https://github.com/docker/login-action/commit/9ad4ce3929bc07d004540e2ebe754234848335e2"><code>9ad4ce3</code></a> Update generated content</li> <li><a href="https://github.com/docker/login-action/commit/884eadd4f88fc6034a7a1ba10fbd2fd69404b94b"><code>884eadd</code></a> Bump <code>@​aws-sdk/client-ecr-public</code> from 3.53.0 to 3.186.0</li> <li><a href="https://github.com/docker/login-action/commit/a266232f5c33001624fdfca7a1d9e5c5612a20ac"><code>a266232</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/298">#298</a> from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...</li> <li><a href="https://github.com/docker/login-action/commit/f97efcfbf9cb420547dae40adf642fc2366c979a"><code>f97efcf</code></a> Update generated content</li> <li><a href="https://github.com/docker/login-action/commit/5ae789beac0ced16338cc5996b168a5785de8ae9"><code>5ae789b</code></a> Bump <code>@​aws-sdk/client-ecr</code> from 3.53.0 to 3.186.0</li> <li><a href="https://github.com/docker/login-action/commit/71c23b5b3471683fb0acf7a6c821f834735aec44"><code>71c23b5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/292">#292</a> from docker/dependabot/npm_and_yarn/actions/core-1.10.0</li> <li><a href="https://github.com/docker/login-action/commit/6401d70aab8811e905cbf52b0eae2c58bc274b5b"><code>6401d70</code></a> Update generated content</li> <li><a href="https://github.com/docker/login-action/commit/67e8909cc694e896d07b96876522f898972abbfd"><code>67e8909</code></a> Bump <code>@​actions/core</code> from 1.9.1 to 1.10.0</li> <li><a href="https://github.com/docker/login-action/commit/21f251affc0769ccac8a1cf17e937592fb492337"><code>21f251a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/275">#275</a> from crazy-max/redact-aws-creds</li> <li>Additional commits viewable in <a href="https://github.com/docker/login-action/compare/49ed152c8eca782a232dede0303416e8f356c37b...f4ef78c080cd8ba55a85445d5b36e214a81df20a">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=2.0.0&new-version=2.1.0)](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> Co-authored-by: Zach Wasserman <zach@fleetdm.com>
2023-03-01 01:19:37 +00:00
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.19.8
- name: Install Go Dependencies
run: make deps-go
- name: Build fleetdm/fleetctl
run: make fleetctl-docker
- name: Push to Docker
run: |
docker tag fleetdm/fleetctl fleetdm/fleetctl:${{ inputs.image_tag }}
docker push fleetdm/fleetctl:${{ inputs.image_tag }}
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@9986a6552bc4571882a4a67e016b17361412b4df # v2.7.1
with:
image: fleetdm/fleetctl
tags: ${{ inputs.image_tag }}
registry: quay.io/
username: fleetdm+fleetreleaser
password: ${{ secrets.QUAY_REGISTRY_PASSWORD }}