Skip to content

Commit 1bbf497

Browse files
committed
chore: replace dependabot emirror with repo dispatch
1 parent d95494a commit 1bbf497

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

.github/workflows/automerge.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
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.
@@ -38,26 +36,3 @@ jobs:
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

.github/workflows/mirror-image.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Mirror Image
22

33
on:
4+
repository_dispatch:
5+
types:
6+
- mirror-image
47
workflow_call:
58
inputs:
69
image:
@@ -15,18 +18,16 @@ on:
1518

1619
permissions:
1720
contents: read
21+
packages: write
22+
id-token: write
1823

1924
jobs:
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
@@ -43,7 +44,7 @@ jobs:
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 }}

0 commit comments

Comments
 (0)