forked from klakegg/docker-hugo
-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (67 loc) · 1.84 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Docker Image build CI
on:
pull_request:
branches:
- master
push:
branches:
- release/*
workflow_dispatch:
jobs:
build:
runs-on: floryn90-runners
steps:
- name: Clean Workspace
uses: AutoModality/action-clean@v1
- name: Checkout
uses: actions/checkout@v4
- name: Load assetpath
run: |
if [[ -f /runnertmp/.path ]]; then
source /runnertmp/.path
fi
- name: Load servicepath
run: |
if [[ -f /runner/.path ]]; then
source /runner/.path
fi
- name: Load System Env
run: |
if [[ -f /etc/environment ]]; then
source /etc/environment
fi
- name: Install build essential
run: |
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get -y install build-essential curl apt-utils wget unzip
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
uses: docker/login-action@v3
with:
username: floryn90
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: floryn90/hugo
- name: Prepare
run: make prepare
- name: Build
run: make build-debug
- name: Upload target content
uses: actions/upload-artifact@v4
with:
name: target
path: target
# - name: Test Docsy
# run: sudo make test-docsy
# - name: Test DocuAPI
# run: sudo make test-docuapi
- name: Push edge images
if: "!startsWith(github.ref, 'refs/tags/')"
run: make push-edge