From 6404f8a15553a498a08c16eaf9976d845c2e0763 Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Fri, 25 Apr 2025 09:27:58 +0000 Subject: [PATCH 1/6] ci(ghcr): add deploy on GitHub --- .github/workflows/publish-to-ghcr.yml | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/publish-to-ghcr.yml diff --git a/.github/workflows/publish-to-ghcr.yml b/.github/workflows/publish-to-ghcr.yml new file mode 100644 index 000000000..f575f080b --- /dev/null +++ b/.github/workflows/publish-to-ghcr.yml @@ -0,0 +1,37 @@ +name: Publish Docker Images to GHCR + +on: + push: + branches: + - main + +jobs: + build-and-push: + name: Build and Push Docker Images + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker images + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository_owner }}/redis:latest + ghcr.io/${{ github.repository_owner }}/redis:${{ github.sha }} \ No newline at end of file From d5828494dc89559037ca485c09338cb8d9d97651 Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Fri, 25 Apr 2025 09:49:08 +0000 Subject: [PATCH 2/6] fix: branch --- .github/workflows/publish-to-ghcr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-ghcr.yml b/.github/workflows/publish-to-ghcr.yml index f575f080b..d8650c357 100644 --- a/.github/workflows/publish-to-ghcr.yml +++ b/.github/workflows/publish-to-ghcr.yml @@ -3,7 +3,7 @@ name: Publish Docker Images to GHCR on: push: branches: - - main + - master jobs: build-and-push: @@ -34,4 +34,4 @@ jobs: push: true tags: | ghcr.io/${{ github.repository_owner }}/redis:latest - ghcr.io/${{ github.repository_owner }}/redis:${{ github.sha }} \ No newline at end of file + ghcr.io/${{ github.repository_owner }}/redis:${{ github.sha }} From a6a6c132e5fb173330e02113809a2aa1186764ac Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 28 Apr 2025 08:10:11 +0200 Subject: [PATCH 3/6] fix: arm target platform --- .github/workflows/publish-to-ghcr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-to-ghcr.yml b/.github/workflows/publish-to-ghcr.yml index d8650c357..7c8a34bba 100644 --- a/.github/workflows/publish-to-ghcr.yml +++ b/.github/workflows/publish-to-ghcr.yml @@ -35,3 +35,4 @@ jobs: tags: | ghcr.io/${{ github.repository_owner }}/redis:latest ghcr.io/${{ github.repository_owner }}/redis:${{ github.sha }} + platforms: linux/amd64,linux/arm64 From 5ea92d393b8e843e117fb5d9977e0ea813f8fb74 Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 28 Apr 2025 08:11:04 +0200 Subject: [PATCH 4/6] ci: remove latest --- .github/workflows/publish-to-ghcr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-to-ghcr.yml b/.github/workflows/publish-to-ghcr.yml index 7c8a34bba..e4ecfb83f 100644 --- a/.github/workflows/publish-to-ghcr.yml +++ b/.github/workflows/publish-to-ghcr.yml @@ -33,6 +33,5 @@ jobs: context: . push: true tags: | - ghcr.io/${{ github.repository_owner }}/redis:latest ghcr.io/${{ github.repository_owner }}/redis:${{ github.sha }} platforms: linux/amd64,linux/arm64 From 19eeb8ad5de0b59499d02d9c0014f2a4075d613c Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 28 Apr 2025 22:44:22 +0200 Subject: [PATCH 5/6] ci: add release/* --- .github/workflows/publish-to-ghcr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-to-ghcr.yml b/.github/workflows/publish-to-ghcr.yml index e4ecfb83f..e3ce358e4 100644 --- a/.github/workflows/publish-to-ghcr.yml +++ b/.github/workflows/publish-to-ghcr.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - release/* jobs: build-and-push: From 2e0000d755ea639b01a1160136dbf18f558a41c0 Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 28 Apr 2025 22:49:04 +0200 Subject: [PATCH 6/6] ci: add tags --- .github/workflows/publish-to-ghcr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-to-ghcr.yml b/.github/workflows/publish-to-ghcr.yml index e3ce358e4..3680ff6c1 100644 --- a/.github/workflows/publish-to-ghcr.yml +++ b/.github/workflows/publish-to-ghcr.yml @@ -5,6 +5,8 @@ on: branches: - master - release/* + tags: + - '*' jobs: build-and-push: