cert-manager-webhook-example/.github/workflows/push.yml
2021-03-03 15:40:21 +01:00

34 lines
978 B
YAML

---
on:
release:
types:
- created
jobs:
multi-arch-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Prepare release tag
id: tag
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: |
containeroo/cert-manager-webhook-bluecat:latest
containeroo/cert-manager-webhook-bluecat:${{ steps.tag.outputs.version }}