Init build-push to quay/gatekeeper #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and push to quay | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' # tags matching v*, i.e. v0.0.1, v1.0.0-rc.0 | |
pull_request: | |
branches: | |
- master | |
- release-[0-9]+.[0-9]+ | |
env: | |
VERSION_TAG: ${{ github.ref_name }} | |
REPOSITORY: quay.io/gatekeeper/gatekeeper | |
jobs: | |
build: | |
name: Image build and push | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all tags and branches | |
- name: Set Up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: build and push | |
run: | | |
DOCKER_USER=${{secrets.QUAY_USER}} DOCKER_PASSWORD=${{secrets.QUAY_PASSWORD}} REPOSITORY=${{env.REPOSITORY}} make docker-login | |
REPOSITORY=${{env.REPOSITORY}} VERSION=${{env.VERSION_TAG}} make docker-buildx-release |