chore: add static env for opencontainer description

This commit is contained in:
Alexander Nicholson 4584443+DragonStuff@users.noreply.github.com
2025-09-05 09:48:52 +02:00
parent 8ddd9270b3
commit 99e6e46b04

View File

@@ -21,6 +21,11 @@ permissions:
id-token: write
attestations: write
env:
# Static metadata; safe for forks
IMAGE_DESCRIPTION: Campfire is a web-based chat application with multiple rooms, direct messages, file attachments with previews, search, web push notifications, @mentions, and bot integrations. Single-tenant; production-ready image with web app, background jobs, caching, file serving, and SSL.
SOURCE_URL: https://github.com/${{ github.repository }}
jobs:
build:
name: Build and push image (${{ matrix.arch }})
@@ -61,7 +66,6 @@ jobs:
IMAGE_REF="${IMAGE_NAME:-$GITHUB_REPOSITORY}"
CANONICAL_IMAGE="${REGISTRY}/${IMAGE_REF,,}"
echo "canonical=${CANONICAL_IMAGE}" >> "$GITHUB_OUTPUT"
echo "source_url=https://github.com/${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
- name: Extract Docker metadata (tags, labels) with arch suffix
id: meta
@@ -79,8 +83,7 @@ jobs:
latest=auto
suffix=-${{ matrix.arch }}
labels: |
org.opencontainers.image.source=${{ steps.vars.outputs.source_url }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.source=${{ env.SOURCE_URL }}
- name: Build and push (${{ matrix.platform }})
id: build
@@ -89,7 +92,7 @@ jobs:
context: .
file: Dockerfile
build-args: |
OCI_SOURCE=${{ steps.vars.outputs.source_url }}
OCI_SOURCE=${{ env.SOURCE_URL }}
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
@@ -116,7 +119,6 @@ jobs:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_DESCRIPTION: Campfire is a web-based chat application with multiple rooms, DMs, file attachments, search, web push notifications, @mentions, and bot integrations. Single-tenant; production-ready image with web app, background jobs, caching, file serving, and SSL.
steps:
- name: Set up Docker Buildx (for imagetools)
uses: docker/setup-buildx-action@v3.11.1
@@ -136,7 +138,6 @@ jobs:
IMAGE_REF="${IMAGE_NAME:-$GITHUB_REPOSITORY}"
CANONICAL_IMAGE="${REGISTRY}/${IMAGE_REF,,}"
echo "canonical=${CANONICAL_IMAGE}" >> "$GITHUB_OUTPUT"
echo "source_url=https://github.com/${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
- name: Compute base tags (no suffix)
id: meta
@@ -153,8 +154,7 @@ jobs:
flavor: |
latest=auto
labels: |
org.opencontainers.image.source=${{ steps.vars.outputs.source_url }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.source=${{ env.SOURCE_URL }}
- name: Create multi-arch manifests
shell: bash