|
1 | | -name: Mirror Image |
| 1 | +name: Mirror Dependencies |
2 | 2 | # We mirror upstream container images like Migra, imgproxy, etc. because these |
3 | 3 | # are usually only available on certain image registry and not others (e.g. only |
4 | 4 | # on Docker Hub and not on ghcr.io or AWS ECR). |
@@ -47,39 +47,15 @@ jobs: |
47 | 47 | git checkout main |
48 | 48 | echo "tags=$(go run tools/listdep/main.go)" >> $GITHUB_OUTPUT |
49 | 49 |
|
50 | | - mirror: |
51 | | - runs-on: ubuntu-latest |
| 50 | + publish: |
52 | 51 | needs: |
53 | 52 | - setup |
54 | 53 | if: ${{ needs.setup.outputs.tags != needs.setup.outputs.curr }} |
55 | 54 | strategy: |
56 | 55 | matrix: |
57 | 56 | src: ${{ fromJson(needs.setup.outputs.tags) }} |
58 | | - permissions: |
59 | | - contents: read |
60 | | - packages: write |
61 | | - id-token: write |
62 | | - steps: |
63 | | - - id: strip |
64 | | - run: | |
65 | | - TAG=${{ matrix.src }} |
66 | | - echo "dst=${TAG##*/}" >> $GITHUB_OUTPUT |
67 | | - - name: configure aws credentials |
68 | | - uses: aws-actions/configure-aws-credentials@v4.0.1 |
69 | | - with: |
70 | | - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} |
71 | | - aws-region: us-east-1 |
72 | | - - uses: docker/login-action@v3 |
73 | | - with: |
74 | | - registry: public.ecr.aws |
75 | | - - uses: docker/login-action@v3 |
76 | | - with: |
77 | | - registry: ghcr.io |
78 | | - username: ${{ github.actor }} |
79 | | - password: ${{ secrets.GITHUB_TOKEN }} |
80 | | - - uses: akhilerm/tag-push-action@v2.1.0 |
81 | | - with: |
82 | | - src: docker.io/${{ matrix.src }} |
83 | | - dst: | |
84 | | - public.ecr.aws/supabase/${{ steps.strip.outputs.dst }} |
85 | | - ghcr.io/supabase/${{ steps.strip.outputs.dst }} |
| 57 | + # Call workflow explicitly because events from actions cannot trigger more actions |
| 58 | + uses: ./.github/workflows/mirror-image.yml |
| 59 | + with: |
| 60 | + image: ${{ matrix.src }} |
| 61 | + secrets: inherit |
0 commit comments