From 8c39360ce379b42281eab57a6ec9142028727580 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Thu, 18 Dec 2025 09:21:46 -0600 Subject: [PATCH] Update Docker image annotations to include dynamic repository and actor information --- .github/workflows/base-image.yml | 51 +++++++++++++++++--------------- .github/workflows/ci.yml | 51 +++++++++++++++++--------------- .github/workflows/release.yml | 51 +++++++++++++++++--------------- 3 files changed, 81 insertions(+), 72 deletions(-) diff --git a/.github/workflows/base-image.yml b/.github/workflows/base-image.yml index 72d263d0..c944621b 100644 --- a/.github/workflows/base-image.yml +++ b/.github/workflows/base-image.yml @@ -172,42 +172,45 @@ jobs: REPO=${{ needs.prepare.outputs.repo_name }} BRANCH_TAG=${{ needs.prepare.outputs.branch_tag }} TIMESTAMP=${{ needs.prepare.outputs.timestamp }} + ACTOR=${{ github.actor }} + REPO_URL="https://github.com/${{ github.repository }}" + SHA=${{ github.sha }} echo "Creating multi-arch manifest for ${OWNER}/${REPO}" # GitHub Container Registry manifests # branch tag (e.g. base or base-dev) docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${BRANCH_TAG}-${TIMESTAMP}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=DispatcharrBase version: ${BRANCH_TAG}-${TIMESTAMP}" \ --tag ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG} \ ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-amd64 ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-arm64 # branch + timestamp tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${BRANCH_TAG}-${TIMESTAMP}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=DispatcharrBase version: ${BRANCH_TAG}-${TIMESTAMP}" \ --tag ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-${TIMESTAMP} \ ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-${TIMESTAMP}-amd64 ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-${TIMESTAMP}-arm64 @@ -215,36 +218,36 @@ jobs: # Docker Hub manifests # branch tag (e.g. base or base-dev) docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${BRANCH_TAG}-${TIMESTAMP}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=DispatcharrBase version: ${BRANCH_TAG}-${TIMESTAMP}" \ --tag docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG} \ docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-amd64 docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-arm64 # branch + timestamp tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${BRANCH_TAG}-${TIMESTAMP}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=DispatcharrBase version: ${BRANCH_TAG}-${TIMESTAMP}" \ --tag docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-${TIMESTAMP} \ docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-${TIMESTAMP}-amd64 docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-${TIMESTAMP}-arm64 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8cd7079..629b6d26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -198,76 +198,79 @@ jobs: BRANCH_TAG=${{ needs.prepare.outputs.branch_tag }} VERSION=${{ needs.prepare.outputs.version }} TIMESTAMP=${{ needs.prepare.outputs.timestamp }} + ACTOR=${{ github.actor }} + REPO_URL="https://github.com/${{ github.repository }}" + SHA=${{ github.sha }} echo "Creating multi-arch manifest for ${OWNER}/${REPO}" # branch tag (e.g. latest or dev) docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${BRANCH_TAG}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION}-${TIMESTAMP}" \ --tag ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG} \ ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-amd64 ghcr.io/${OWNER}/${REPO}:${BRANCH_TAG}-arm64 # version + timestamp tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${VERSION}-${TIMESTAMP}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION}-${TIMESTAMP}" \ --tag ghcr.io/${OWNER}/${REPO}:${VERSION}-${TIMESTAMP} \ ghcr.io/${OWNER}/${REPO}:${VERSION}-${TIMESTAMP}-amd64 ghcr.io/${OWNER}/${REPO}:${VERSION}-${TIMESTAMP}-arm64 # also create Docker Hub manifests using the same username docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${BRANCH_TAG}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION}-${TIMESTAMP}" \ --tag docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG} \ docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-amd64 docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${BRANCH_TAG}-arm64 docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${VERSION}-${TIMESTAMP}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION}-${TIMESTAMP}" \ --tag docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${VERSION}-${TIMESTAMP} \ docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${VERSION}-${TIMESTAMP}-amd64 docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${VERSION}-${TIMESTAMP}-arm64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06b5e44f..ba574525 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -180,42 +180,45 @@ jobs: REPO=${{ needs.prepare.outputs.repo_name }} VERSION=${{ needs.prepare.outputs.new_version }} TIMESTAMP=${{ needs.prepare.outputs.timestamp }} + ACTOR=${{ github.actor }} + REPO_URL="https://github.com/${{ github.repository }}" + SHA=${{ github.sha }} echo "Creating multi-arch manifest for ${OWNER}/${REPO}" # GitHub Container Registry manifests # latest tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=latest" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION} Build date: ${TIMESTAMP}" \ --tag ghcr.io/${OWNER}/${REPO}:latest \ ghcr.io/${OWNER}/${REPO}:latest-amd64 ghcr.io/${OWNER}/${REPO}:latest-arm64 # version tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${VERSION}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION} Build date: ${TIMESTAMP}" \ --tag ghcr.io/${OWNER}/${REPO}:${VERSION} \ ghcr.io/${OWNER}/${REPO}:${VERSION}-amd64 ghcr.io/${OWNER}/${REPO}:${VERSION}-arm64 @@ -223,36 +226,36 @@ jobs: # Docker Hub manifests # latest tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=latest" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION} Build date: ${TIMESTAMP}" \ --tag docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:latest \ docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:latest-amd64 docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:latest-arm64 # version tag docker buildx imagetools create \ - --annotation "org.opencontainers.image.title=${{ needs.prepare.outputs.repo_name }}" \ + --annotation "org.opencontainers.image.title=${REPO}" \ --annotation "org.opencontainers.image.description=Your ultimate IPTV & stream Management companion." \ - --annotation "org.opencontainers.image.url=https://github.com/${{ github.repository }}" \ - --annotation "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \ + --annotation "org.opencontainers.image.url=${REPO_URL}" \ + --annotation "org.opencontainers.image.source=${REPO_URL}" \ --annotation "org.opencontainers.image.version=${VERSION}" \ --annotation "org.opencontainers.image.created=${TIMESTAMP}" \ - --annotation "org.opencontainers.image.revision=${{ github.sha }}" \ + --annotation "org.opencontainers.image.revision=${SHA}" \ --annotation "org.opencontainers.image.licenses=See repository" \ --annotation "org.opencontainers.image.documentation=https://dispatcharr.github.io/Dispatcharr-Docs/" \ --annotation "org.opencontainers.image.vendor=${OWNER}" \ - --annotation "org.opencontainers.image.authors=${{ github.actor }}" \ - --annotation "maintainer=${{ github.actor }}" \ + --annotation "org.opencontainers.image.authors=${ACTOR}" \ + --annotation "maintainer=${ACTOR}" \ --annotation "build_version=Dispatcharr version: ${VERSION} Build date: ${TIMESTAMP}" \ --tag docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${VERSION} \ docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${VERSION}-amd64 docker.io/${{ secrets.DOCKERHUB_ORGANIZATION }}/${REPO}:${VERSION}-arm64