Files
supabase/.github/workflows/publish_image.yml

58 lines
1.4 KiB
YAML

name: Publish to Image Registry
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
version:
description: 'Image tag'
required: true
type: string
jobs:
publish:
runs-on: ubuntu-latest
steps:
- id: meta
uses: docker/metadata-action@v4
with:
images: |
supabase/studio
public.ecr.aws/t3w2s2c9/studio
flavor: |
latest=false
tags: |
type=ref,event=tag
type=raw,value=${{ inputs.version }},enable=${{ github.event_name != 'push' }}
- uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64
- uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}
- uses: docker/build-push-action@v3
with:
push: true
context: '{{defaultContext}}:studio'
target: production
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max