-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (41 loc) · 1.42 KB
/
pnpm-dependabot.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
36
37
38
39
40
41
# https://github.com/dependabot/dependabot-core/issues/1736
# inspired by: https://gist.github.com/Purpzie/8ed86ae38c73f440881bbee0523a324b
name: Dependabot
on: pull_request_target
permissions: read-all
jobs:
fetch-dependabot-metadata:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
outputs:
package-ecosystem: ${{ steps.metadata.outputs.package-ecosystem }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
update-lockfile:
runs-on: ubuntu-latest
needs: [fetch-dependabot-metadata]
if: needs.fetch-dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn'
permissions:
pull-requests: write
contents: write
steps:
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{secrets.PAT}}
- name: Update pnpm lock file
run: pnpm i --lockfile-only --prefix swift_browser_ui_frontend
- name: Trigger update
run: |
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
git add swift_browser_ui_frontend/pnpm-lock.yaml
git commit -m "Update pnpm-lock.yaml"
git push