Skip to content

Commit 5eeb5de

Browse files
committed
ci: add docker build
1 parent b865eaa commit 5eeb5de

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

.github/workflows/deploy-docker.yml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# #
2+
# @type github workflow
3+
# @desc deploys docker container
4+
# @author Aetherinox
5+
# @url https://github.com/Aetherinox
6+
# #
7+
8+
name: "⚙️ Deploy › Docker"
9+
run-name: "⚙️ Deploy › Docker"
10+
11+
# #
12+
# triggers
13+
# #
14+
15+
on:
16+
workflow_dispatch:
17+
18+
push:
19+
branches:
20+
- 'main'
21+
tags:
22+
- '*'
23+
24+
# #
25+
# environment variables
26+
# #
27+
28+
env:
29+
BOT_NAME_1: AdminServ
30+
BOT_NAME_2: AdminServX
31+
BOT_NAME_3: EuropaServ
32+
BOT_NAME_DEPENDABOT: dependabot[bot]
33+
34+
# #
35+
# jobs
36+
# #
37+
38+
jobs:
39+
docker-release:
40+
name: "Push Release"
41+
runs-on: ubuntu-latest
42+
permissions: write-all
43+
steps:
44+
45+
- name: "☑️ Checkout"
46+
uses: actions/checkout@v4
47+
id: task_release_checkout
48+
with:
49+
fetch-depth: 0
50+
51+
- name: "⚙️ Set up QEMU"
52+
uses: docker/setup-qemu-action@v3
53+
54+
- name: "⚙️ Set up Docker Buildx"
55+
id: buildx
56+
uses: docker/setup-buildx-action@v3
57+
58+
- name: "⚙️ Login to DockerHub"
59+
if: github.event_name != 'pull_request'
60+
uses: docker/login-action@v3
61+
with:
62+
registry: ghcr.io
63+
username: ${{ github.actor }}
64+
password: ${{ secrets.SELF_TOKEN_CL }}
65+
66+
- name: "🔨 Docker meta"
67+
id: meta
68+
uses: docker/metadata-action@v3
69+
with:
70+
images: |
71+
ghcr.io/Aetherinox/thetvapp-docker
72+
tags: |
73+
type=raw,value=latest,enable=${{ endsWith(github.ref, 'main') }}
74+
type=ref,event=tag
75+
76+
- name: "📦 Build and push"
77+
uses: docker/build-push-action@v3
78+
with:
79+
context: .
80+
platforms: linux/amd64
81+
push: ${{ github.event_name != 'pull_request' }}
82+
tags: ${{ steps.meta.outputs.tags }}
83+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)