Skip to content

GHCR

GHCR #55

Workflow file for this run

name: GHCR
on:
push:
tags:
- '*'
permissions:
packages: write
contents: read
attestations: write
id-token: write
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
include:
- task: api
context: ./api/
- task: pmtiles
context: .
file: ./tasks/pmtiles/Dockerfile.compose
- task: events
context: .
file: ./tasks/events/Dockerfile
- task: retention
context: .
file: ./tasks/retention/Dockerfile.compose
steps:
- uses: actions/checkout@v6
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/cloudtak-${{ matrix.task }}
- name: Setup Buildx
uses: docker/setup-buildx-action@v4
- name: Build and Push
id: push
uses: docker/build-push-action@v7
with:
context: ${{matrix.context}}
file: ${{matrix.file}}
push: true
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
cache-from: type=gha,scope=${{matrix.task}}
cache-to: type=gha,mode=max,scope=${{matrix.task}}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository_owner }}/cloudtak-${{ matrix.task }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true