-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.16 KB
/
_yarn-deduplicate.yml
File metadata and controls
40 lines (35 loc) · 1.16 KB
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
name: Deduplicate yarn.lock
on:
workflow_call:
secrets:
TXO_GITHUB_BOT_APP_ID:
required: true
TXO_GITHUB_BOT_APP_PRIVATE_KEY:
required: true
jobs:
resolve-yarn-lock:
name: "/"
runs-on: ubuntu-latest
steps:
- uses: technology-studio/github-workflows/.github/actions/github-app-token-generator@696ee6d68a8fdb357c5a6e26e748fba32f09a9bb # main
id: get-token
with:
app-id: ${{ secrets.TXO_GITHUB_BOT_APP_ID }}
private-key: ${{ secrets.TXO_GITHUB_BOT_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ steps.get-token.outputs.token }}
- name: Run `npx yarn-deduplicate`
run: |
npx yarn-deduplicate
yarn
- name: Commit yarn.lock
run: |
git config --global user.email "txo-github-bot[bot]@users.noreply.github.com"
git config --global user.name "TXO GitHub Bot[bot]"
git add yarn.lock
git commit -m "chore: run \`npx yarn-deduplicate\`"
- name: Push yarn.lock
run: |
git push