supabase-postgres.git / summary / log / commit / refs
commit 47b28431f042a698551e87684e045d1b2c1df4c8
Author: Paul Cioanca <paul.cioanca@supabase.io>
Commit: GitHub <noreply@github.com>
Date: Fri Dec 08 13:58:14 2023 +0000
chore: deploy AIO Postgres image to Fly.io's registry (#835)
* chore: deploy AIO image to Fly's registry
.github/workflows/dockerhub-release-aio.yml | 40 ++++++++++++++++++++++++++---
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/dockerhub-release-aio.yml b/.github/workflows/dockerhub-release-aio.yml
index 3664c3c0..6adec1f1 100644
--- a/.github/workflows/dockerhub-release-aio.yml
+++ b/.github/workflows/dockerhub-release-aio.yml
@@ -1,13 +1,12 @@
-name: Release AIO image on Dockerhub
+name: Release AIO image
on:
push:
branches:
- - pcnc/trigger-build
+ - develop
paths:
- ".github/workflows/dockerhub-release-aio.yml"
- "docker/all-in-one/*"
- - "common.vars*"
workflow_run:
workflows: [Release on Dockerhub]
branches:
@@ -21,6 +20,7 @@ jobs:
outputs:
docker_version: ${{ steps.settings.outputs.postgres-version }}
image_tag: supabase/postgres:aio-${{ steps.settings.outputs.postgres-version }}
+ fly_image_tag: supabase-postgres-image:aio-${{ steps.settings.outputs.postgres-version }}
build_args: ${{ steps.args.outputs.result }}
steps:
- uses: actions/checkout@v3
@@ -108,3 +108,37 @@ jobs:
with:
version: aio-${{ needs.settings.outputs.docker_version }}
secrets: inherit
+
+ publish_to_fly:
+ needs: [settings, build_image]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: docker/setup-buildx-action@v3
+ - uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ - name: Push to Fly
+ uses: superfly/flyctl-actions/setup-flyctl@dfdfedc86b296f5e5384f755a18bf400409a15d0
+ with:
+ version: 0.1.64
+ - run: |
+ docker pull ${{ needs.settings.outputs.image_tag }}_amd64
+ docker tag ${{ needs.settings.outputs.image_tag }}_amd64 "registry.fly.io/staging-${{ needs.settings.outputs.fly_image_tag }}"
+ docker tag ${{ needs.settings.outputs.image_tag }}_amd64 "registry.fly.io/prod-${{ needs.settings.outputs.fly_image_tag }}"
+
+ flyctl auth docker
+ docker push "registry.fly.io/staging-${{ needs.settings.outputs.fly_image_tag }}"
+ docker push "registry.fly.io/prod-${{ needs.settings.outputs.fly_image_tag }}"
+ env:
+ FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
+
+ - name: Slack Notification
+ if: ${{ failure() }}
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }}
+ SLACK_USERNAME: "gha-failures-notifier"
+ SLACK_COLOR: "danger"
+ SLACK_MESSAGE: "Failed pushing AIO image to Fly.io"
+ SLACK_FOOTER: ""
[parent: 533f49a1a956]