Skip to content

Add Azure

Add Azure #163

Workflow file for this run

---
name: Docker build and push
on:
schedule:
- cron: "0 4 * * 0"
workflow_dispatch:
pull_request:
branches:
- 'main'
- 'master'
push:
branches:
- 'main'
- 'master'
tags:
- 'v*'
paths-ignore:
- 'dockerfiles/Azure'
env:
REGISTRY: ghcr.io
jobs:
docker:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- dockerfile: dockerfiles/Lint
image: ghcr.io/rheinwerk/molecule:lint
build-args: "OS_VERSION=3.17"
- dockerfile: dockerfiles/Ubuntu
image: ghcr.io/rheinwerk/molecule:ubuntu-20.04
build-args: "OS_VERSION=20.04"
- dockerfile: dockerfiles/Ubuntu
image: ghcr.io/rheinwerk/molecule:ubuntu-22.04
build-args: "OS_VERSION=22.04"
- dockerfile: dockerfiles/Debian
image: ghcr.io/rheinwerk/molecule:debian-12
build-args: "OS_VERSION=bookworm"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: set up qemu
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
build-args: ${{ matrix.build-args }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ matrix.image }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64