2023-02-14 13:57:37 +03:00
|
|
|
name: image
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- '**.adoc'
|
|
|
|
- '**.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- '**.adoc'
|
|
|
|
- '**.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
buildx:
|
|
|
|
if: github.repository_owner == 'astefanutti'
|
|
|
|
name: buildx
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
2024-07-05 16:07:42 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-14 13:57:37 +03:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2024-07-05 16:07:42 +03:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-02-14 13:57:37 +03:00
|
|
|
with:
|
|
|
|
platforms: arm64
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2024-07-05 16:07:42 +03:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-02-14 13:57:37 +03:00
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
2024-07-05 16:07:42 +03:00
|
|
|
uses: docker/login-action@v3
|
2023-02-14 13:57:37 +03:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ github.token }}
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
2024-07-05 16:07:42 +03:00
|
|
|
uses: docker/metadata-action@v5
|
2023-02-14 13:57:37 +03:00
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
ghcr.io/${{ github.repository_owner }}/decktape
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
|
|
|
|
|
|
|
|
- name: Build and push
|
2024-07-05 16:07:42 +03:00
|
|
|
uses: docker/build-push-action@v6
|
2023-02-14 13:57:37 +03:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
cache-from: type=gha,scope=${{ github.ref_name }}
|
|
|
|
cache-to: type=gha,scope=${{ github.ref_name }},mode=max
|
|
|
|
provenance: false
|