Merge pull request #560 from rancher/renovate/release/v5.0-all-minor-… #28
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 : Publish Images & artifacts (via goreleaser) | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
REGISTRY: docker.io | |
REPO : rancher | |
permissions: | |
contents: write | |
jobs: | |
ci : | |
uses: rancher/backup-restore-operator/.github/workflows/ci.yaml@release/v5.0 | |
permissions: | |
contents: read | |
goreleaser: | |
needs: [ | |
ci | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name : Package release helm charts | |
run : make package-helm | |
- run : mkdir -p ./build/artifacts/ && mv -v ./dist/artifacts/ ./build/ | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GORELEASER_CURRENT_TAG: ${{ github.ref_name }} | |
push: | |
needs : [ | |
ci | |
] | |
permissions: | |
contents : read | |
id-token: write | |
name : Build and push BRO images | |
runs-on : runs-on,image=ubuntu22-full-x64,runner=4cpu-linux-x64,run-id=${{ github.run_id }} | |
steps: | |
- name : "Read vault secrets" | |
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 | |
- name : Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ env.DOCKER_USERNAME }} | |
password: ${{ env.DOCKER_PASSWORD }} | |
- name: Build and push BRO image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./package/Dockerfile | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.REPO }}/backup-restore-operator:${{ github.ref_name }} | |
platforms: linux/amd64,linux/arm64 |