From 9a1ff2a74ff5faa0b7c149afe29e6da3259bf7c2 Mon Sep 17 00:00:00 2001 From: Ricardo Pinto Date: Thu, 29 May 2025 13:24:39 +0100 Subject: [PATCH] Added migrate image to public registry ref https://linear.app/ghost/issue/PROD-1662 - Added migrate image to public registry --- .github/workflows/cicd.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a8161ee6c..f098e0336 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -102,7 +102,7 @@ jobs: org.opencontainers.image.documentation=https://github.com/TryGhost/ActivityPub org.opencontainers.image.source=https://github.com/TryGhost/ActivityPub - - name: "Migrations Docker meta" + - name: "Migrations Docker meta for private registry" id: migrations-docker-metadata uses: docker/metadata-action@v5 with: @@ -117,6 +117,27 @@ jobs: type=semver,pattern={{major}} type=sha,priority=1100 + - name: "ActivityPub Migrations Docker metadata for public registry" + id: activitypub-migrations-docker-metadata-public + if: github.ref == 'refs/heads/main' + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/tryghost/activitypub-migrations + tags: | + type=edge,branch=main + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha,priority=1100 + labels: | + org.opencontainers.image.title=Ghost — ActivityPub + org.opencontainers.image.description=Federate your Ghost site with ActivityPub to join the world's largest open network. + org.opencontainers.image.vendor=Ghost Foundation + org.opencontainers.image.licenses=MIT + org.opencontainers.image.documentation=https://github.com/TryGhost/ActivityPub + org.opencontainers.image.source=https://github.com/TryGhost/ActivityPub + - name: "Build Docker Image for ActivityPub" uses: docker/build-push-action@v6 with: @@ -180,7 +201,7 @@ jobs: labels: ${{ steps.activitypub-docker-metadata-public.outputs.labels }} platforms: linux/amd64 - - name: "Push Migrations Docker Image" + - name: "Push Migrations Docker image to private registry" if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'labeled' || github.event.action == 'unlabeled')) uses: docker/build-push-action@v6 with: @@ -188,6 +209,16 @@ jobs: push: true tags: ${{ steps.migrations-docker-metadata.outputs.tags }} + - name: "Push Migrations Docker image to public registry" + if: github.ref == 'refs/heads/main' + uses: docker/build-push-action@v6 + with: + context: migrate + push: true + tags: ${{ steps.activitypub-migrations-docker-metadata-public.outputs.tags }} + labels: ${{ steps.activitypub-migrations-docker-metadata-public.outputs.labels }} + platforms: linux/amd64 + - uses: tryghost/actions/actions/slack-build@main if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' with: