mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
name: Publish to Image Registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'studio'
|
|
tags:
|
|
- '*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Image tag'
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
supabase/studio
|
|
public.ecr.aws/supabase/studio
|
|
ghcr.io/supabase/studio
|
|
flavor: |
|
|
latest=false
|
|
tags: |
|
|
type=ref,event=tag
|
|
type=sha,prefix={{date 'YYYYMMDD'}},enable=${{ github.ref_type == 'branch' }}
|
|
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 }}
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
context: '{{defaultContext}}'
|
|
file: studio/Dockerfile
|
|
target: production
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|