-
-
Notifications
You must be signed in to change notification settings - Fork 1
186 lines (165 loc) · 5.19 KB
/
docker-push-daily.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: nightly and on.push docker builds
on:
# to trigger manually if we really need it
workflow_dispatch:
push:
branches:
- 'main'
paths:
- docker/**
- "!docker/README.md"
tags:
- "v*.*.*"
schedule:
# * is a special character in YAML so you have to quote this string
# triggers every day at 00:00 UTC (midnight)
- cron: '0 0 * * *'
jobs:
build_and_publish_to_pypi:
environment: 'pypi'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
if: startsWith(github.ref, 'refs/tags/v')
- name: Build and publish to pypi
if: startsWith(github.ref, 'refs/tags/v')
uses: JRubics/poetry-publish@v1.17
with:
python_version: "3.11.2"
pypi_token: ${{ secrets.DEPLOY_FROM_GITHUB_TO_PYPI_ONBOARDME }}
docker-amd64:
environment: 'docker-amd64'
needs: build_and_publish_to_pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build/push - prereqs only
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
platforms: linux/amd64
tags: |
jessebot/onboardme:debian12-prereqs
jessebot/onboardme:prereqs
- name: Build/push - run onboardme - default pkgs
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
platforms: linux/amd64
build-args: "DEFAULT=true"
tags: |
jessebot/onboardme:latest
jessebot/onboardme:debian12
- name: Build/push - default + devops pkgs
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
platforms: linux/amd64
build-args: |
"DEFAULT=true"
"DEVOPS=true"
tags: |
jessebot/onboardme:devops
jessebot/onboardme:debian12-devops
- name: Build/push - full tui pkgs
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
platforms: linux/amd64
build-args: |
"DEFAULT=true"
"DEVOPS=true"
"MAIL=true"
"MUSIC=true"
tags: |
jessebot/onboardme:full-tui
jessebot/onboardme:debian12-full-tui
docker-arm64:
environment: 'docker-arm64'
runs-on: ubuntu-latest
needs: build_and_publish_to_pypi
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build/push - arm - prereqs only
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
# use special Dockerfile for arm builds
file: docker/Dockerfile.arm
platforms: linux/arm64
tags: |
jessebot/onboardme:debian12-arm-prereqs
jessebot/onboardme:arm-prereqs
- name: Build/push - arm - default pkgs
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
# use special Dockerfile for arm builds
file: docker/Dockerfile.arm
platforms: linux/arm64
build-args: "DEFAULT=true"
tags: |
jessebot/onboardme:latest-arm
jessebot/onboardme:debian12-arm
- name: Build/push arm - default + devops pkgs
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
# use special Dockerfile for arm builds
file: docker/Dockerfile.arm
platforms: linux/arm64
build-args: |
"DEFAULT=true"
"DEVOPS=true"
tags: |
jessebot/onboardme:arm-devops
jessebot/onboardme:debian12-arm-devops
- name: Build/push arm - full tui pkgs
uses: docker/build-push-action@v4
with:
push: true
# build from docker/ directory
context: docker
# use special Dockerfile for arm builds
file: docker/Dockerfile.arm
platforms: linux/arm64
build-args: |
"DEFAULT=true"
"DEVOPS=true"
"MAIL=true"
"MUSIC=true"
tags: |
jessebot/onboardme:arm-full-tui
jessebot/onboardme:debian12-arm-full-tui