Skip to content

Build multiarch alpine core image #13

Build multiarch alpine core image

Build multiarch alpine core image #13

Workflow file for this run

name: edge images
on:
push:
paths:
- edge/alpine/Dockerfile
- .github/workflows/edge.yaml
schedule:
# Rebuild on the 17th of each month
- cron: '19 1 17 * *'
workflow_dispatch:
jobs:
build:
name: Alpine
runs-on: ubuntu-latest
env:
PUSH_IMAGE: ${{ github.repository == 'pandoc/dockerfiles' &&
(github.ref == 'refs/heads/main' ||
github.ref_type == 'tag' ||
github.event_name != 'pull_request') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ env.PUSH_IMAGE }}
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ env.PUSH_IMAGE }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "pandoc/multiarch"
- name: Meta for minimal
id: meta-minimal
uses: docker/metadata-action@v5
with:
images: |
pandoc/minimal
ghcr.io/pandoc/minimal
- name: 'pandoc/minimal:edge-alpine'
uses: docker/build-push-action@v6
with:
context: '.'
file: 'edge/alpine/Dockerfile'
labels: ${{ steps.meta-minimal.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: ${{ env.PUSH_IMAGE }}
target: minimal
tags: |
pandoc/minimal:edge-alpine
ghcr.io/pandoc/minimal:edge-alpine
- name: Meta for core
id: meta-core
uses: docker/metadata-action@v5
with:
images: |
pandoc/core
ghcr.io/pandoc/core
- name: 'pandoc/core:edge-alpine'
uses: docker/build-push-action@v6
with:
file: 'edge/alpine/Dockerfile'
labels: ${{ steps.meta-core.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: ${{ env.PUSH_IMAGE }}
target: core
tags: |
pandoc/core:edge
pandoc/core:edge-alpine
ghcr.io/pandoc/core:edge
ghcr.io/pandoc/core:edge-alpine