-
Notifications
You must be signed in to change notification settings - Fork 27
executable file
·158 lines (136 loc) · 3.71 KB
/
docker_alpha.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Build Smanga Alpha Docker
on:
workflow_dispatch:
push:
paths:
- .github/workflows/docker_alpha.yml
env:
BUILD_BASE: false
jobs:
base:
name: Build Smanga Base Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set Up QEMU
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build Base
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/build-push-action@v4
with:
context: .
file: docker/base.Dockerfile
platforms: |
linux/amd64
push: true
build-args: |
SMANGA_VERSION=${{ steps.set-version.outputs.version }}
tags: |
${{ secrets.DOCKER_USERNAME }}/smanga-base:alpha
build:
needs: [base]
name: Build Smanga Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set Version
id: set-version
run: |
SMANGA_VERSION=$(jq -r '.version' package.json)
echo "version=${SMANGA_VERSION}" >> $GITHUB_OUTPUT
-
name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
-
name: Build Web
run: |
npm install
npm run build-docker
-
name: Set Up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
platforms: |
linux/amd64
push: true
build-args: |
SMANGA_VERSION=${{ steps.set-version.outputs.version }}
SMANGA_BASE_VERSION=alpha
SMANGA_BASE_NAME=${{ secrets.DOCKER_USERNAME }}
tags: |
${{ secrets.DOCKER_USERNAME }}/smanga:nosql-alpha
build_mysql:
needs: [build, base]
name: Build Smanga Mysql Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set Version
id: set-version
run: |
SMANGA_VERSION=$(jq -r '.version' package.json)
echo "version=${SMANGA_VERSION}" >> $GITHUB_OUTPUT
-
name: Set Up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
file: docker/mysql.Dockerfile
platforms: |
linux/amd64
push: true
build-args: |
SMANGA_VERSION=alpha
SMANGA_BASE_NAME=${{ secrets.DOCKER_USERNAME }}
tags: |
${{ secrets.DOCKER_USERNAME }}/smanga:alpha