Skip to content

Commit

Permalink
publish images CI
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Lamarre <[email protected]>
  • Loading branch information
alexandreLamarre committed Apr 11, 2024
1 parent 25859b2 commit b8447f2
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name : Publish Images

on:
push:
tags:
- "*"

env:
REGISTRY: docker.io
REPO : rancher

jobs:
push:
name : Build and push BRO images
runs-on : ubuntu-latest
steps:
- name : Checkout repository
uses: actions/checkout@v4
with:
go-version: 1.22
- 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: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name : CI
run : make ci
# setup tag name
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
echo TAG_NAME=$(echo $GITHUB_REF | sed -e "s|refs/tags/||") >> $GITHUB_ENV
- name: Build and push BRO image
uses: docker/build-push-action@v5
with:
context: .
file: ./package/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPO }}/backup-restore-operator:${{ env.TAG_NAME }}
platforms: linux/amd64,linux/arm64

0 comments on commit b8447f2

Please sign in to comment.