generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (28 loc) · 997 Bytes
/
update-dist.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
name: Update Dist
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
update-dist:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.MH4GF_PAT }}
- uses: MH4GF/shared-config/.github/composite-actions/setup-pnpm@main
- run: pnpm package
- name: Commit and Push if there are changes
run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --staged --quiet || git commit -m 'update dist'
git push