forked from bangumi/server
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (53 loc) · 1.26 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
52
53
54
55
56
57
58
59
60
61
62
name: Build
on:
push:
branches-ignore:
- renovate/**
paths:
- ".github/workflows/build.yaml"
- "go.mod"
- "go.sum"
- "Taskfile.yaml"
- "**.go"
- "**.go.json"
- "etc/Dockerfile"
pull_request:
branches:
- master
paths:
- ".github/workflows/build.yaml"
- "go.mod"
- "go.sum"
- "Taskfile.yaml"
- "**.go"
- "**.go.json"
- "etc/Dockerfile"
jobs:
docker:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: false
- name: Go Build Cache (build)
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg
key: go-cache-122-${{ hashFiles('**/go.sum') }}-build
restore-keys: |
go-cache-122-${{ hashFiles('**/go.sum') }}-
go-cache-122-
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- run: go get ./...
- run: task build
name: Build Binary
- run: docker build -t tmp -f etc/Dockerfile .
- run: docker run tmp -h