-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.93 KB
/
docker-image.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
name: Publish Docker image
on:
push:
branches: ['master']
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Getting image tag
id: tag
run: |
echo DDNETPP_TAG="$(grep 'ARG DDNETPP_VERSION=' ddnetpp/Dockerfile | cut -d'=' -f2)" >> $GITHUB_OUTPUT
echo DDNET_SIMPLE_TAG="$(grep 'ARG DDNET_VERSION=' ddnet-simple/Dockerfile | cut -d'=' -f2)" >> $GITHUB_OUTPUT
echo DDNET_MYSQL_TAG="$(grep 'ARG DDNET_VERSION=' ddnet-mysql/Dockerfile | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Publish ddnetpp
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ddnetpp
push: true
tags: |
docker.io/chillerdragon/ddnetpp:${{ steps.tag.outputs.DDNETPP_TAG }}
docker.io/chillerdragon/ddnetpp:latest
- name: Publish ddnet-simple
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ddnet-simple
push: true
tags: |
docker.io/chillerdragon/ddnet-simple:${{ steps.tag.outputs.DDNET_SIMPLE_TAG }}
docker.io/chillerdragon/ddnet-simple:latest
- name: Publish ddnet-mysql
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ddnet-mysql
push: true
tags: |
docker.io/chillerdragon/ddnet-mysql:${{ steps.tag.outputs.DDNET_MYSQL_TAG }}
docker.io/chillerdragon/ddnet-mysql:latest