-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (39 loc) · 1.15 KB
/
dependency.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
42
43
44
45
name: dependency
on:
push:
branches:
- "renovate/*"
jobs:
deduplicate:
runs-on: ubuntu-latest
steps:
- id: step_find_pr
name: Find pull request
uses: jwalton/gh-find-current-pr@v1
- name: Checkout code repository
uses: actions/checkout@v3
with:
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }}
if: ${{ steps.step_find_pr.outputs.number }}
- name: Enable Corepack
run: |
corepack enable
pnpm --version
- name: Run pnpm dedupe
run: |
if $(git log -1 --pretty=format:'%an' | egrep -q 'renovate'); then
echo "deduplicate lockfile"
pnpm dedupe
else
echo "Skipping lockfile deduplication"
fi
if: ${{ steps.step_find_pr.outputs.number }}
- name: Push to GitHub
continue-on-error: true
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "chore(deps): deduplicate pnpm-lock.yaml"
git push
if: ${{ steps.step_find_pr.outputs.number }}