Skip to content

Use cache if exists

Use cache if exists #7

Workflow file for this run

name: pr
on:
pull_request:
types:
- opened
- synchronize
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
variant: [bookworm-jpg-png]
arch: [linux/amd64, linux/arm64]
timeout-minutes: 50
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image
uses: docker/build-push-action@v5
with:
context: .
provenance: false
push: false
platforms: ${{ matrix.arch }}
cache-from: type=registry,ref=ghcr.io/cyberagentai/libvips:${{ matrix.variant }}
file: Dockerfile.${{ matrix.variant }}
concurrency:
group: pr-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true