Skip to content

Drop arm64 build in CI #39

Drop arm64 build in CI

Drop arm64 build in CI #39

Workflow file for this run

name: Build and Push
on:
release:
types:
- published
push:
branches:
- '*'
tags:
- v*
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
jobs:
build:
runs-on: ubuntu-latest
strategy:
# There is no point in building the images in parallel, the main build time is spent in the common base layers.
# Use the matrix for simplifying the job description, but build them sequentially.
max-parallel: 1
fail-fast: true
matrix:
include:
- target: basic
imageSuffix: ""
- target: python
imageSuffix: "/python"
steps:
- uses: actions/checkout@v3
- uses: docker/metadata-action@v4
id: meta
with:
images: |
ghcr.io/${{ github.repository_owner }}/markdown-paper-setup${{ matrix.imageSuffix}}
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
flavor: |
latest=${{ github.ref == 'refs/heads/master' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
target: ${{ matrix.target }}
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/markdown-paper-setup${{ matrix.imageSuffix}}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/markdown-paper-setup${{ matrix.imageSuffix}}:buildcache,mode=max
secrets: |
GIT_AUTH_TOKEN=${{ github.token }}