Skip to content

Commit

Permalink
fix: Avoid extra steps and extra images on custom build (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecabaco authored Nov 7, 2024
1 parent ad9d895 commit 3509652
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/manual_prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }} \
Expand All @@ -150,21 +140,7 @@ jobs:
- name: Mirror to ECR
uses: akhilerm/[email protected]
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 }}
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3509652

Please sign in to comment.