Skip to content

Build Images

Build Images #39

Workflow file for this run

name: Build Images
on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
USERNAME: ${{ github.actor }}
IMAGE_NAME: aellwein/cert-manager-webhook-netcup
# set version here for upcoming release
IMAGE_TAG: 1.0.27
IMAGE_TAG_DEVELOP: develop
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build & push Docker image (all architectures)
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main'
with:
platforms: linux/arm/v7,linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x
push: true
context: .
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
# this is used mainly for testing
- name: Build & push Docker image (amd64 only for develop)
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/develop'
with:
platforms: linux/amd64
push: true
context: .
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG_DEVELOP }}