-
-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (33 loc) · 1.1 KB
/
dependabot-update.yml
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
name: Dependabot update addon
on: pull_request
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
outputs:
addon: ${{ steps.addon.outputs.slug }}
new-version: ${{ steps.metadata.outputs.new-version }}
package-ecosystem: ${{ steps.metadata.outputs.package-ecosystem }}
steps:
- uses: actions/checkout@v4
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: addon
if: ${{ steps.metadata.outputs.directory != '/' }}
run: |
cd .${{ steps.metadata.outputs.directory }}
test -f config.json || exit
jq -r '"slug=\(.slug)"' config.json >> "$GITHUB_OUTPUT"
update:
needs: dependabot
if: ${{ needs.dependabot.outputs.addon }}
uses: ./.github/workflows/update.yml
with:
addon: ${{ needs.dependabot.outputs.addon }}
version: ${{ needs.dependabot.outputs.new-version }}
ref: ${{ github.head_ref }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}