-
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (53 loc) · 1.66 KB
/
front-end-assets.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
46
47
48
49
50
51
52
53
54
55
56
57
58
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Front-end assets"
on:
workflow_dispatch: null
permissions:
contents: "write"
pull-requests: "write"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v4"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4"
with:
node-version: "18"
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install production dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Build assets"
run: "yarn run build"
-
name: "Check difference to repository"
id: "list_diff"
run: |
if ! git diff --exit-code; then
echo "exit_status=1" >>"${GITHUB_OUTPUT}"
fi
-
name: "Create pull request"
if: "${{ steps.list_diff.outputs.exit_status == '1' }}"
uses: "peter-evans/create-pull-request@v5"
with:
add-paths: "./"
branch: "build-assets"
commit-message: "Regenerate assets"
title: "Build front-end assets"
body: |
Automated changes by running "build" script.
delete-branch: true