-
Notifications
You must be signed in to change notification settings - Fork 423
50 lines (47 loc) · 1.46 KB
/
mirror-image.yml
File metadata and controls
50 lines (47 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Mirror Image
on:
repository_dispatch:
types:
- mirror-image
workflow_call:
inputs:
image:
required: true
type: string
workflow_dispatch:
inputs:
image:
description: "org/image:tag"
required: true
type: string
permissions:
contents: read
packages: write
id-token: write
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- id: strip
run: |
TAG=${{ github.event.client_payload.image || inputs.image }}
echo "image=${TAG##*/}" >> $GITHUB_OUTPUT
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: public.ecr.aws
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: akhilerm/tag-push-action@f35ff2cb99d407368b5c727adbcc14a2ed81d509 # v2.2.0
with:
src: docker.io/${{ github.event.client_payload.image || inputs.image }}
dst: |
public.ecr.aws/supabase/${{ steps.strip.outputs.image }}
ghcr.io/supabase/${{ steps.strip.outputs.image }}