forked from glasskube/glasskube
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.39 KB
/
build.yaml
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
name: Build Go Project
on:
push:
paths-ignore:
- website/**
pull_request:
paths-ignore:
- website/**
merge_group:
types:
- checks_requested
paths-ignore:
- website/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version: 1.22.x
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "20.9"
cache: npm
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: bin
key: ${{ runner.os }}-${{ hashFiles('Makefile', 'go.mod', 'go.sum') }}
- name: Install dependencies
run: npm ci
- run: make all
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: artifacts-${{ runner.os }}-${{ runner.arch }}
path: dist/
- name: Check if repository is clean
run: |
STATUS="$(git status --porcelain)"
if [ -z "$STATUS" ]; then
echo Repository is clean.
else
echo "Repository is not clean:
$STATUS"
exit 1
fi