-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.04 KB
/
build.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
name: Build
on:
workflow_dispatch:
push:
branches:
- renovate/**
- dependabot/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
name: Build Code
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup project
uses: ./.github/actions/setup
- name: Run build
run: pnpm run build
- name: Check difference
id: diff
run: |
set +e
git diff --exit-code dist/
echo "has-diff=$([ $? -eq 0 ] && echo false || echo true)" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.diff.outputs.has-diff == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit --all --message "build(main): update build"
git push