From 3509652d9cff3c42afa51a7167139deff1df80d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20Caba=C3=A7o?= Date: Thu, 7 Nov 2024 23:48:48 +0000 Subject: [PATCH] fix: Avoid extra steps and extra images on custom build (#1196) --- .github/workflows/manual_prod_build.yml | 32 ++++--------------------- mix.exs | 2 +- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/.github/workflows/manual_prod_build.yml b/.github/workflows/manual_prod_build.yml index ea3d7fcbc..5f2e38b89 100644 --- a/.github/workflows/manual_prod_build.yml +++ b/.github/workflows/manual_prod_build.yml @@ -5,11 +5,9 @@ on: branch: description: "Branch to run the workflow" required: true - default: "main" docker_tag: description: "Tag to be used by the docker image on push" required: true - default: "latest" jobs: release: runs-on: ubuntu-20.04 @@ -41,7 +39,6 @@ jobs: images: | supabase/realtime tags: | - type=raw,value=v${{ needs.release.outputs.version }}_${{ env.arch }} type=raw,value=${{ github.event.inputs.docker_tag }}_${{ env.arch }} - uses: docker/setup-buildx-action@v2 @@ -78,7 +75,6 @@ jobs: images: | supabase/realtime tags: | - type=raw,value=v${{ needs.release.outputs.version }}_${{ env.arch }} type=raw,value=${{ github.event.inputs.docker_tag }}_${{ env.arch }} - uses: docker/login-action@v2 @@ -117,13 +113,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Merge multi-arch manifests for versioned output - run: | - docker buildx imagetools create -t supabase/realtime:v${{ needs.release.outputs.version }} \ - supabase/realtime@${{ needs.docker_x86_release.outputs.image_digest }} \ - supabase/realtime@${{ needs.docker_arm_release.outputs.image_digest }} - - - name: Merge multi-arch manifests for latest output + - name: Merge multi-arch manifests for custom output run: | docker buildx imagetools create -t supabase/realtime:${{ github.event.inputs.docker_tag }} \ supabase/realtime@${{ needs.docker_x86_release.outputs.image_digest }} \ @@ -150,21 +140,7 @@ jobs: - name: Mirror to ECR uses: akhilerm/tag-push-action@v2.0.0 with: - src: docker.io/supabase/realtime:v${{ needs.release.outputs.version }} + src: docker.io/supabase/realtime:v${{ github.event.inputs.docker_tag }} dst: | - public.ecr.aws/supabase/realtime:v${{ needs.release.outputs.version }} - ghcr.io/supabase/realtime:v${{ needs.release.outputs.version }} - - update-branch-name: - needs: [release, docker_x86_release, docker_arm_release, merge_manifest] - runs-on: ubuntu-latest - steps: - - name: Checkout branch - uses: actions/checkout@v2 - with: - ref: refs/heads/main - - - name: Update branch name - run: | - git branch -m main releases/v${{ needs.release.outputs.version }} - git push origin HEAD:releases/v${{ needs.release.outputs.version }} + public.ecr.aws/supabase/realtime:v${{ github.event.inputs.docker_tag }} + ghcr.io/supabase/realtime:v${{ github.event.inputs.docker_tag }} diff --git a/mix.exs b/mix.exs index 007c55c81..06355a97e 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Realtime.MixProject do def project do [ app: :realtime, - version: "2.33.24", + version: "2.33.25", elixir: "~> 1.16.0", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod,