File tree Expand file tree Collapse file tree 2 files changed +7
-31
lines changed Expand file tree Collapse file tree 2 files changed +7
-31
lines changed Original file line number Diff line number Diff line change 1313 # Checking the actor will prevent your Action run failing on non-Dependabot
1414 # PRs but also ensures that it only does work for Dependabot PRs.
1515 if : ${{ github.actor == 'dependabot[bot]' }}
16- outputs :
17- docker_tags : ${{ steps.updated.outputs.dockerTags }}
1816 steps :
1917 # This first step will fail if there's no metadata and so the approval
2018 # will not occur.
3836 run : gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
3937 env :
4038 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41-
42- - id : updated
43- run : |
44- dockerTags=$(echo '${{ steps.meta.outputs.updated-dependencies-json }}' | jq -c \
45- 'map(select(.dependencyName == "supabase/logflare"))|map("\(.dependencyName):\(.newVersion)")')
46- echo "dockerTags=$dockerTags" >> $GITHUB_OUTPUT
47-
48- mirror :
49- needs :
50- - dependabot
51- permissions :
52- contents : read
53- packages : write
54- id-token : write
55- if : ${{ needs.dependabot.outputs.docker_tags != '[]' }}
56- strategy :
57- matrix :
58- src : ${{ fromJson(needs.dependabot.outputs.docker_tags) }}
59- # Call workflow explicitly because events from actions cannot trigger more actions
60- uses : ./.github/workflows/mirror-image.yml
61- with :
62- image : ${{ matrix.src }}
63- secrets : inherit
Original file line number Diff line number Diff line change 11name : Mirror Image
22
33on :
4+ repository_dispatch :
5+ types :
6+ - mirror-image
47 workflow_call :
58 inputs :
69 image :
1518
1619permissions :
1720 contents : read
21+ packages : write
22+ id-token : write
1823
1924jobs :
2025 mirror :
2126 runs-on : ubuntu-latest
22- permissions :
23- contents : read
24- packages : write
25- id-token : write
2627 steps :
2728 - id : strip
2829 run : |
29- TAG=${{ inputs.image }}
30+ TAG=${{ github.event.client_payload.image || inputs.image }}
3031 echo "image=${TAG##*/}" >> $GITHUB_OUTPUT
3132 - name : configure aws credentials
3233 uses : aws-actions/configure-aws-credentials@v5.1.1
4344 password : ${{ secrets.GITHUB_TOKEN }}
4445 - uses : akhilerm/tag-push-action@v2.2.0
4546 with :
46- src : docker.io/${{ inputs.image }}
47+ src : docker.io/${{ github.event.client_payload.image || inputs.image }}
4748 dst : |
4849 public.ecr.aws/supabase/${{ steps.strip.outputs.image }}
4950 ghcr.io/supabase/${{ steps.strip.outputs.image }}
You can’t perform that action at this time.
0 commit comments