Skip to content

fix pkgid, format was stabilized in 1.75 I think #102

fix pkgid, format was stabilized in 1.75 I think

fix pkgid, format was stabilized in 1.75 I think #102

Workflow file for this run

name: docker
on:
push:
branches: ['main']
tags:
- "v*.*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.event.repository.name}}
IMAGE_NAME_FQ: ${{ github.repository }}
jobs:
bake:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
buildkitd-flags: --debug
- name: Login to ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FQ }}
tags: |
type=ref,event=branch
type=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- run: echo "build_arm=true" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')
- name: Build and push
uses: docker/bake-action@v4.3.0
with:
push: true
files: |
docker-bake.hcl
${{ steps.meta.outputs.bake-file}}
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
- name: Delete old images
uses: snok/container-retention-policy@v2
with:
image-names: ${{ env.IMAGE_NAME }}
cut-off: One day ago UTC
keep-at-least: 2
account-type: personal
filter-tags: sha-*
skip-tags: edge,main,v*
token: ${{ secrets.GH_TOKEN_DELETE }}