Release v3.14.3 #162
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 release images | |
on: | |
push: | |
branches: | |
- main | |
- release-[0-9]+.[0-9]+ | |
tags: | |
- 'v*' # tags matching v*, i.e. v0.0.1, v1.0.0-rc.0 | |
env: | |
VERSION_TAG: ${{ github.ref_name }} | |
jobs: | |
build: | |
name: Image build and push | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch all history for all tags and branches | |
- name: Set Up Go to Install OPM | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
# Issue ref: https://github.com/actions/checkout/issues/290. | |
- name: Extract Non-Annotated Version Tag | |
run: | | |
echo "GIT_VERSION=$(git describe --tags --match='v*' --always --dirty)" >> ${GITHUB_ENV} | |
- name: Verify release manifest | |
if: ${{ github.ref_type == 'tag' }} | |
run: | | |
make release | |
git diff --exit-code ./deploy/gatekeeper-operator.yaml | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
with: | |
driver-opts: image=moby/buildkit:v0.8-beta | |
- uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Build and Push Images | |
run: | | |
echo "::group::gatekeeper-operator" | |
make docker-build | |
make docker-push | |
echo "::endgroup::" | |
echo "::group::gatekeeper-operator-bundle" | |
make bundle-build | |
make bundle-push | |
echo "::endgroup::" | |
echo "::group::gatekeeper-operator-bundle-index" | |
make bundle-index-build | |
make bundle-index-push | |
echo "::endgroup::" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
if: ${{ github.ref_type == 'tag' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions. | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Gatekeeper Operator ${{ github.ref }} | |
body: | | |
To install the Gatekeeper Operator: | |
``` | |
kubectl apply -f https://raw.githubusercontent.com/${{ github.repository }}/${{ env.VERSION_TAG }}/deploy/gatekeeper-operator.yaml | |
``` | |
generateReleaseNotes: true | |
draft: true | |
prerelease: false |