Skip to content

Commit d63fdf3

Browse files
committed
chore: mirror images from dependabot
1 parent 598dc96 commit d63fdf3

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/automerge.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ 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 }}
1618
steps:
1719
# This first step will fail if there's no metadata and so the approval
1820
# will not occur.
@@ -36,3 +38,26 @@ jobs:
3638
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
3739
env:
3840
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.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ on:
1414
# mirrored yet. It's a catch-22!
1515
#
1616
# TODO: Make the cli start test run *after* we mirror images (if needed).
17-
pull_request_review:
18-
types:
19-
- submitted
2017
workflow_dispatch:
2118

2219
permissions:
@@ -25,7 +22,6 @@ permissions:
2522
jobs:
2623
setup:
2724
runs-on: ubuntu-latest
28-
if: ${{ github.event_name == 'workflow_dispatch' || github.event.review.state == 'approved' }}
2925
outputs:
3026
tags: ${{ steps.list.outputs.tags }}
3127
curr: ${{ steps.curr.outputs.tags }}

0 commit comments

Comments
 (0)