Skip to content

container: update to f42 #13

container: update to f42

container: update to f42 #13

Workflow file for this run

name: Container
on:
push:
branches:
- main
paths:
- .github/workflows/container.yml
- Dockerfile
pull_request:
branches:
- main
paths:
- .github/workflows/container.yml
- Dockerfile
env:
REGISTRY: ghcr.io
# This has to be lowercase
IMAGE_NAME: asahilinux/mkdocs-asahi
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Log into the container registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the container image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
# https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#adding-a-description-to-multi-arch-images
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Build the Asahi Linux documentation website using mkdocs