-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #414 from mjura/v2.9-release
Add release workflow
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
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 }} |
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