Merge pull request #284 from rancher/renovate/main-kubernetes-kuberne… #37
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*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
# write is needed for: | |
# - OIDC for cosign's use in ecm-distro-tools/publish-image. | |
# - Read vault secrets in rancher-eio/read-vault-secrets. | |
id-token: write | |
strategy: | |
matrix: | |
include: | |
# Four images are created: | |
# - Multi-arch manifest for amd64, arm64 and s390x | |
- tag-suffix: "" | |
platforms: linux/amd64,linux/arm64,linux/s390x | |
# - arm64 manifest | |
- tag-suffix: "-arm64" | |
platforms: linux/arm64 | |
# - amd64 manifest | |
- tag-suffix: "-amd64" | |
platforms: linux/amd64 | |
# - s390x manifest | |
- tag-suffix: "-s390x" | |
platforms: linux/s390x | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Load Secrets from Vault | |
uses: rancher-eio/read-vault-secrets@main | |
with: | |
secrets: | | |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ; | |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ; | |
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials registry | PRIME_REGISTRY ; | |
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials username | PRIME_REGISTRY_USERNAME ; | |
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials password | PRIME_REGISTRY_PASSWORD | |
- name: Build and push all image variations | |
uses: rancher/ecm-distro-tools/actions/publish-image@master | |
with: | |
image: shell | |
tag: ${{ github.ref_name }}${{ matrix.tag-suffix }} | |
platforms: ${{ matrix.platforms }} | |
public-registry: docker.io | |
public-repo: rancher | |
public-username: ${{ env.DOCKER_USERNAME }} | |
public-password: ${{ env.DOCKER_PASSWORD }} | |
prime-registry: ${{ env.PRIME_REGISTRY }} | |
prime-repo: rancher | |
prime-username: ${{ env.PRIME_REGISTRY_USERNAME }} | |
prime-password: ${{ env.PRIME_REGISTRY_PASSWORD }} |