mirror of
https://github.com/agresdominik/texlive.git
synced 2026-07-21 17:20:54 +00:00
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IMAGE: ghcr.io/agresdominik/texlive
|
|
|
|
jobs:
|
|
build:
|
|
name: build ${{ matrix.arch }}
|
|
runs-on: ${{ matrix.runner }}
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { runner: ubuntu-24.04, arch: amd64 }
|
|
- { runner: ubuntu-24.04-arm, arch: arm64 }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/${{ matrix.arch }}
|
|
push: true
|
|
tags: ${{ env.IMAGE }}:${{ github.sha }}-${{ matrix.arch }}
|
|
cache-from: type=gha,scope=${{ matrix.arch }}
|
|
cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
|
|
|
|
manifest:
|
|
name: merge manifest
|
|
needs: build
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Create multi-arch manifests
|
|
run: |
|
|
for tag in latest "${GITHUB_SHA}"; do
|
|
docker buildx imagetools create -t "${IMAGE}:${tag}" \
|
|
"${IMAGE}:${GITHUB_SHA}-amd64" \
|
|
"${IMAGE}:${GITHUB_SHA}-arm64"
|
|
done
|