Skip to content

Commit

Permalink
fix: Push docker latest images using the digests from the versioned o…
Browse files Browse the repository at this point in the history
…utputs (#688)
  • Loading branch information
filipecabaco authored Oct 2, 2023
1 parent 34efac0 commit 9e31a70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Production
on:
push:
branches:
- 'main'
- "main"
jobs:
release:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -35,6 +35,7 @@ jobs:
supabase/realtime
tags: |
type=raw,value=v${{ needs.release.outputs.version }}_${{ env.arch }}
type=raw,value=latest_${{ env.arch }}
- uses: docker/setup-buildx-action@v2

Expand Down Expand Up @@ -71,6 +72,7 @@ jobs:
supabase/realtime
tags: |
type=raw,value=v${{ needs.release.outputs.version }}_${{ env.arch }}
type=raw,value=latest_${{ env.arch }}
- uses: docker/login-action@v2
with:
Expand Down Expand Up @@ -108,12 +110,18 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Merge multi-arch manifests
- 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
run: |
docker buildx imagetools create -t supabase/realtime:latest \
supabase/realtime@${{ needs.docker_x86_release.outputs.image_digest }} \
supabase/realtime@${{ needs.docker_arm_release.outputs.image_digest }}
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down Expand Up @@ -148,7 +156,8 @@ jobs:
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 }}
git push origin HEAD:releases/v${{ needs.release.outputs.version }}
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.23.3",
version: "2.23.4",
elixir: "~> 1.14.0",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 9e31a70

Please sign in to comment.