Add quay push (#8967)

* Add quay push to the snapshot pusher to start

* Tags need to be just the tag part in this one

* Put the tag in a variable

* Fix typos

* Switch up how we define registry to see if it finds the image like this

* Add quay push everywhere else
This commit is contained in:
Tomas Touceda 2022-12-12 14:15:06 -03:00 committed by GitHub
parent 083b781c2c
commit 45e0a14700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 1 deletions

View file

@ -54,3 +54,12 @@ jobs:
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@v2
with:
image: fleetdm/fleetctl
tags: ${{ inputs.image_tag }}
registry: quay.io/
username: fleetdm+fleetreleaser
password: ${{ secrets.QUAY_REGISTRY_PASSWORD }}

View file

@ -56,3 +56,18 @@ jobs:
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get tag
run: |
echo "TAG=$(git describe --tags | sed -e "s/^fleet-//")" >> $GITHUB_OUTPUT
id: docker
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: fleetdm/fleet
tags: ${{ steps.docker.outputs.TAG }}
registry: quay.io/
username: fleetdm+fleetreleaser
password: ${{ secrets.QUAY_REGISTRY_PASSWORD }}

View file

@ -22,7 +22,7 @@ jobs:
#
# Also not run if author is dependabot (it doesn't have access to Github secrets).
if: ${{ (github.repository == 'fleetdm/fleet') && (github.actor != 'dependabot[bot]') }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: Docker Hub
steps:
- name: Checkout
@ -57,3 +57,18 @@ jobs:
# Explicitly push the docker images as GoReleaser will not do so in snapshot mode
- name: Publish Docker images
run: docker push fleetdm/fleet --all-tags
- name: Get tag
run: |
echo "TAG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_OUTPUT
id: docker
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: fleetdm/fleet
tags: ${{ steps.docker.outputs.TAG }}
registry: quay.io/
username: fleetdm+fleetreleaser
password: ${{ secrets.QUAY_REGISTRY_PASSWORD }}