From 598b87f19be62003cf6844f64cf35dfa3cdf7d14 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 17 Mar 2023 12:17:49 +0000 Subject: [PATCH 1/4] Push images to both GHCR and Docker Hub --- .github/workflows/docker.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4bbe5decf88e..61420204fcb8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -34,11 +34,20 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log in to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Calculate docker image tag id: set-tag uses: docker/metadata-action@master with: - images: matrixdotorg/synapse + images: | + matrixdotorg/synapse + ghcr.io/matrix-org/synapse flavor: | latest=false tags: | From 945e1c88134aecd4aa505cac6cc7339b5d42a040 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 17 Mar 2023 12:18:46 +0000 Subject: [PATCH 2/4] Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) --- changelog.d/15281.docker | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/15281.docker diff --git a/changelog.d/15281.docker b/changelog.d/15281.docker new file mode 100644 index 000000000000..6990430ef44d --- /dev/null +++ b/changelog.d/15281.docker @@ -0,0 +1 @@ +Mirror images to the GitHub Container Registry (`ghcr.io/matrix-org/synapse`). \ No newline at end of file From 3a28d92eb25f8194d77708b4741009bf16849ba8 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 17 Mar 2023 13:27:27 +0000 Subject: [PATCH 3/4] Add packages 'write' permission --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 61420204fcb8..64a8b222e5f6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,6 +10,7 @@ on: permissions: contents: read + packages: write jobs: build: From 1480140f0959cb839ff8a0a0350be34db293d7d5 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Mon, 20 Mar 2023 11:59:12 +0000 Subject: [PATCH 4/4] Update .github/workflows/docker.yml --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 64a8b222e5f6..602f5e1759d0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -47,7 +47,7 @@ jobs: uses: docker/metadata-action@master with: images: | - matrixdotorg/synapse + docker.io/matrixdotorg/synapse ghcr.io/matrix-org/synapse flavor: | latest=false