Merge pull request #550 from mjura/cgo-v2.8 #7
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: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
# GitHub settings / example values: | |
# | |
# org level vars: | |
# - PUBLIC_REGISTRY: docker.io | |
# repo level vars: | |
# - PUBLIC_REGISTRY_REPO: rancher | |
# repo level secrets: | |
# - PUBLIC_REGISTRY_USERNAME | |
# - PUBLIC_REGISTRY_PASSWORD | |
permissions: | |
contents: read | |
jobs: | |
publish-public: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Read secrets | |
uses: rancher-eio/read-vault-secrets@main | |
with: | |
secrets: | | |
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials username | PUBLIC_REGISTRY_USERNAME ; | |
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials password | PUBLIC_REGISTRY_PASSWORD ; | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.PUBLIC_REGISTRY }} | |
username: ${{ env.PUBLIC_REGISTRY_USERNAME }} | |
password: ${{ env.PUBLIC_REGISTRY_PASSWORD }} | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name}} | |
- name: Build operator binary | |
run: | | |
make operator | |
- name: Build and push all image variations | |
run: | | |
make image-push | |
TAG="${TAG}-amd64" TARGET_PLATFORMS=linux/amd64 make image-push | |
TAG="${TAG}-arm64" TARGET_PLATFORMS=linux/arm64 make image-push | |
env: | |
TAG: ${{ github.ref_name }} | |
REPO: ${{ vars.PUBLIC_REGISTRY }}/${{ vars.PUBLIC_REGISTRY_REPO }} |