Skip to content

Commit db874f9

Browse files
committed
ci: update dockerhub and github workflow
1 parent 2385ebc commit db874f9

File tree

2 files changed

+308
-2
lines changed

2 files changed

+308
-2
lines changed

.github/workflows/deploy-docker-main.yml

+195
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,198 @@ jobs:
8080
id: task_release_gh_start
8181
run: |
8282
echo "Starting Github docker release"
83+
84+
# #
85+
# Release > Github > Checkout
86+
# #
87+
88+
- name: "☑️ Checkout"
89+
id: task_release_gh_checkout
90+
uses: actions/checkout@v4
91+
with:
92+
fetch-depth: 0
93+
94+
# #
95+
# Release > Github > QEMU
96+
# #
97+
98+
- name: "⚙️ Set up QEMU"
99+
id: task_release_gh_qemu
100+
uses: docker/setup-qemu-action@v3
101+
102+
# #
103+
# Release > Github > Setup BuildX
104+
# #
105+
106+
- name: "⚙️ Setup Buildx"
107+
id: task_release_gh_buildx
108+
uses: docker/setup-buildx-action@v3
109+
with:
110+
version: latest
111+
driver-opts: 'image=moby/buildkit:v0.10.5'
112+
113+
# #
114+
# Release > Github > Registry Login
115+
# #
116+
117+
- name: "⚙️ Login to DockerHub"
118+
id: task_release_gh_registry
119+
if: github.event_name != 'pull_request'
120+
uses: docker/login-action@v3
121+
with:
122+
registry: ghcr.io
123+
username: ${{ github.actor }}
124+
password: ${{ secrets.SELF_TOKEN_CL }}
125+
126+
# #
127+
# Release > Github > Meta
128+
# #
129+
130+
- name: "🔨 Docker meta"
131+
id: task_release_gh_meta
132+
uses: docker/metadata-action@v5
133+
with:
134+
images: |
135+
ghcr.io/Aetherinox/thetvapp-docker
136+
tags: |
137+
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
138+
type=ref,event=tag
139+
140+
# #
141+
# Release > Github > Debug
142+
# #
143+
144+
- name: "🪪 Debug › Print"
145+
id: task_release_gh_print
146+
run: |
147+
echo "registry ............. Github"
148+
echo "github.actor.......... ${{ github.actor }}"
149+
echo "github.ref ........... ${{ github.ref }}"
150+
echo "github.event_name .... ${{ github.event_name }}"
151+
echo "tags ................. ${{ steps.task_release_gh_meta.outputs.tags }}"
152+
echo "labels ............... ${{ steps.task_release_gh_meta.outputs.labels }}"
153+
154+
# #
155+
# Release > Github > Build and Push
156+
# #
157+
158+
- name: "📦 Build and push"
159+
id: task_release_gh_push
160+
uses: docker/build-push-action@v3
161+
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' )
162+
with:
163+
context: .
164+
file: Dockerfile
165+
platforms: linux/amd64
166+
push: ${{ github.event_name != 'pull_request' }}
167+
tags: ${{ steps.task_release_gh_meta.outputs.tags }}
168+
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
169+
170+
# #
171+
# Job > Docker Release > Github
172+
# #
173+
174+
docker-release-dockerhub:
175+
name: >-
176+
📦 Release › Dockerhub
177+
runs-on: ubuntu-latest
178+
permissions:
179+
contents: read
180+
packages: write
181+
attestations: write
182+
id-token: write
183+
steps:
184+
185+
# #
186+
# Release > Dockerhub > Start
187+
# #
188+
189+
- name: "✅ Start"
190+
id: task_release_dh_start
191+
run: |
192+
echo "Starting Github docker release"
193+
194+
# #
195+
# Release > Dockerhub > Checkout
196+
# #
197+
198+
- name: "☑️ Checkout"
199+
id: task_release_dh_checkout
200+
uses: actions/checkout@v4
201+
with:
202+
fetch-depth: 0
203+
204+
# #
205+
# Release > Dockerhub > QEMU
206+
# #
207+
208+
- name: "⚙️ Set up QEMU"
209+
id: task_release_dh_qemu
210+
uses: docker/setup-qemu-action@v3
211+
212+
# #
213+
# Release > Dockerhub > Setup BuildX
214+
# #
215+
216+
- name: "⚙️ Setup Buildx"
217+
id: task_release_dh_buildx
218+
uses: docker/setup-buildx-action@v3
219+
with:
220+
version: latest
221+
driver-opts: 'image=moby/buildkit:v0.10.5'
222+
223+
# #
224+
# Release > Dockerhub > Registry Login
225+
# #
226+
227+
- name: "⚙️ Login to DockerHub"
228+
id: task_release_dh_registry
229+
if: github.event_name != 'pull_request'
230+
uses: docker/login-action@v3
231+
with:
232+
username: aetherinox
233+
password: ${{ secrets.SELF_DOCKERHUB_TOKEN }}
234+
235+
# #
236+
# Release > Dockerhub > Meta
237+
# #
238+
239+
- name: "🔨 Docker meta"
240+
id: task_release_dh_meta
241+
uses: docker/metadata-action@v5
242+
with:
243+
images: |
244+
aetherinox/thetvapp
245+
tags: |
246+
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
247+
type=ref,event=tag
248+
249+
# #
250+
# Release > Dockerhub > Debug
251+
# #
252+
253+
- name: "🪪 Debug › Print"
254+
id: task_release_dh_print
255+
run: |
256+
echo "registry ............. Dockerhub"
257+
echo "github.actor.......... ${{ github.actor }}"
258+
echo "github.ref ........... ${{ github.ref }}"
259+
echo "github.event_name .... ${{ github.event_name }}"
260+
echo "tags ................. ${{ steps.task_release_dh_meta.outputs.tags }}"
261+
echo "labels ............... ${{ steps.task_release_dh_meta.outputs.labels }}"
262+
263+
# #
264+
# Release > Dockerhub > Build and Push
265+
# #
266+
267+
- name: "📦 Build and push"
268+
id: task_release_dh_push
269+
uses: docker/build-push-action@v3
270+
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' )
271+
with:
272+
context: .
273+
file: Dockerfile
274+
platforms: linux/amd64
275+
push: ${{ github.event_name != 'pull_request' }}
276+
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
277+
labels: ${{ steps.task_release_dh_meta.outputs.labels }}

.github/workflows/deploy-docker-php.yml

+113-2
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ jobs:
131131
id: task_release_gh_meta
132132
uses: docker/metadata-action@v5
133133
with:
134-
flavor: |
135-
latest=false
136134
images: |
137135
ghcr.io/Aetherinox/thetvapp-docker
138136
tags: |
139137
type=ref,enable=true,priority=600,prefix=,suffix=-php,event=tag
138+
flavor: |
139+
latest=false
140140
141141
# #
142142
# Release > Github > Debug
@@ -167,3 +167,114 @@ jobs:
167167
push: ${{ github.event_name != 'pull_request' }}
168168
tags: ${{ steps.task_release_gh_meta.outputs.tags }}
169169
labels: ${{ steps.task_release_gh_meta.outputs.labels }}
170+
171+
# #
172+
# Job > Docker Release > Github
173+
# #
174+
175+
docker-release-dockerhub:
176+
name: >-
177+
📦 Release › Dockerhub
178+
runs-on: ubuntu-latest
179+
permissions:
180+
contents: read
181+
packages: write
182+
attestations: write
183+
id-token: write
184+
steps:
185+
186+
# #
187+
# Release > Dockerhub > Start
188+
# #
189+
190+
- name: "✅ Start"
191+
id: task_release_dh_start
192+
run: |
193+
echo "Starting Github docker release"
194+
195+
# #
196+
# Release > Dockerhub > Checkout
197+
# #
198+
199+
- name: "☑️ Checkout"
200+
id: task_release_dh_checkout
201+
uses: actions/checkout@v4
202+
with:
203+
fetch-depth: 0
204+
205+
# #
206+
# Release > Dockerhub > QEMU
207+
# #
208+
209+
- name: "⚙️ Set up QEMU"
210+
id: task_release_dh_qemu
211+
uses: docker/setup-qemu-action@v3
212+
213+
# #
214+
# Release > Dockerhub > Setup BuildX
215+
# #
216+
217+
- name: "⚙️ Setup Buildx"
218+
id: task_release_dh_buildx
219+
uses: docker/setup-buildx-action@v3
220+
with:
221+
version: latest
222+
driver-opts: 'image=moby/buildkit:v0.10.5'
223+
224+
# #
225+
# Release > Dockerhub > Registry Login
226+
# #
227+
228+
- name: "⚙️ Login to DockerHub"
229+
id: task_release_dh_registry
230+
if: github.event_name != 'pull_request'
231+
uses: docker/login-action@v3
232+
with:
233+
username: aetherinox
234+
password: ${{ secrets.SELF_DOCKERHUB_TOKEN }}
235+
236+
# #
237+
# Release > Dockerhub > Meta
238+
# #
239+
240+
- name: "🔨 Docker meta"
241+
id: task_release_dh_meta
242+
uses: docker/metadata-action@v5
243+
with:
244+
images: |
245+
aetherinox/thetvapp
246+
tags: |
247+
type=raw,value=latest,enable=false
248+
type=ref,enable=true,priority=600,prefix=,suffix=-php,event=tag
249+
flavor: |
250+
latest=false
251+
252+
# #
253+
# Release > Dockerhub > Debug
254+
# #
255+
256+
- name: "🪪 Debug › Print"
257+
id: task_release_dh_print
258+
run: |
259+
echo "registry ............. Dockerhub"
260+
echo "github.actor.......... ${{ github.actor }}"
261+
echo "github.ref ........... ${{ github.ref }}"
262+
echo "github.event_name .... ${{ github.event_name }}"
263+
echo "tags ................. ${{ steps.task_release_dh_meta.outputs.tags }}"
264+
echo "labels ............... ${{ steps.task_release_dh_meta.outputs.labels }}"
265+
266+
# #
267+
# Release > Dockerhub > Build and Push
268+
# #
269+
270+
- name: "📦 Build and push"
271+
id: task_release_dh_push
272+
uses: docker/build-push-action@v3
273+
if: ( github.event_name == 'workflow_dispatch' && inputs.PRINT_ONLY == 'false' ) || ( github.event_name == 'push' )
274+
with:
275+
context: .
276+
file: Dockerfile-php.template
277+
platforms: linux/amd64
278+
push: ${{ github.event_name != 'pull_request' }}
279+
tags: ${{ steps.task_release_dh_meta.outputs.tags }}
280+
labels: ${{ steps.task_release_dh_meta.outputs.labels }}

0 commit comments

Comments
 (0)