2022-07-11 13:32:40 +00:00
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
2022-10-24 20:01:00 +00:00
# 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
2022-10-07 15:43:56 +00:00
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
2022-07-11 13:32:40 +00:00
permissions :
contents : read
jobs :
docker-push :
runs-on : ubuntu-latest
environment : Docker Hub
permissions :
contents : write
steps :
- name : Checkout
2022-08-31 10:44:22 +00:00
uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
2022-07-11 13:32:40 +00:00
- name : Login to Docker Hub
2023-03-01 01:19:37 +00:00
uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
2022-07-11 13:32:40 +00:00
with :
username : ${{ secrets.DOCKERHUB_USERNAME }}
password : ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name : Set up Go
2023-05-17 20:56:16 +00:00
uses : actions/setup-go@v2.1.3
2022-07-11 13:32:40 +00:00
with :
2023-04-07 19:05:22 +00:00
go-version : 1.19 .8
2022-07-11 13:32:40 +00:00
- name : Install Go Dependencies
run : make deps-go
- name : Build fleetdm/fleetctl
run : make fleetctl-docker
- name : Push to Docker
2022-07-11 17:57:54 +00:00
run : |
docker tag fleetdm/fleetctl fleetdm/fleetctl:${{ inputs.image_tag }}
docker push fleetdm/fleetctl:${{ inputs.image_tag }}
2022-07-11 13:32:40 +00:00
2022-12-12 17:15:06 +00:00
- name : Push To quay.io
id : push-to-quay
2023-03-01 01:55:38 +00:00
uses : redhat-actions/push-to-registry@9986a6552bc4571882a4a67e016b17361412b4df # v2.7.1
2022-12-12 17:15:06 +00:00
with :
image : fleetdm/fleetctl
tags : ${{ inputs.image_tag }}
registry : quay.io/
username : fleetdm+fleetreleaser
password : ${{ secrets.QUAY_REGISTRY_PASSWORD }}