Skip to content

Workflow file for this run

name: Build and Push Docker Image
on:
release:
types: [published]
workflow_run:
workflows: [Tests]
branches:
- main
types:
- completed
jobs:
build-and-push:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.release.tag_name != '' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
file: ./Dockerfile
push: true
tags: |
kiwicom/k8s-vault-operator:latest
kiwicom/k8s-vault-operator:${{github.ref_name}}