Skip to content

Commit 10a5dda

Browse files
committed
build: update Docker build and push actions
- Updated the schedule for the "push" event to run every Saturday at 3 AM - Renamed the job from "ubuntu-2204" to "build-ubuntu-2204" - Renamed the job from "ubuntu-2004" to "build-ubuntu-2004" - Renamed the job from "ubuntu-1804" to "build-ubuntu-1804"
1 parent e03d89e commit 10a5dda

File tree

1 file changed

+36
-17
lines changed

1 file changed

+36
-17
lines changed

.github/workflows/docker-publish.yml

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,42 @@ name: Docker Publish
33
on:
44
workflow_dispatch:
55
push:
6-
branches: ["main", "master"]
6+
branches: "main"
7+
paths:
8+
- Dockerfile*
79
schedule:
8-
- cron: "0 23 * * *"
10+
- cron: "0 2 * * 6"
911

1012
jobs:
11-
ubuntu-2204:
13+
build-ubuntu-2204:
14+
name: Build Ubuntu 22.04
1215
runs-on: ubuntu-latest
1316
steps:
1417
- name: Checkout
1518
uses: actions/checkout@v3
16-
- name: Set up QEMU
19+
20+
- name: Setup QEMU
1721
uses: docker/setup-qemu-action@v2
18-
- name: Set up Docker Buildx
22+
23+
- name: Setup Docker Buildx
1924
uses: docker/setup-buildx-action@v2.7.0
25+
2026
- name: Build
2127
run: docker build -t gameservermanagers/linuxgsm:ubuntu-22.04 -f ./Dockerfile.ubuntu-2204 .
22-
#- name: Test
23-
# run: docker run --rm gameservermanagers/linuxgsm:ubuntu-22.04 ./linuxgsm.sh list
28+
2429
- name: Login to DockerHub
2530
uses: docker/login-action@v2.2.0
2631
with:
2732
username: ${{ secrets.DOCKER_HUB_USERNAME }}
2833
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
34+
2935
- name: Login to GitHub Container Registry
3036
uses: docker/login-action@v2.2.0
3137
with:
3238
registry: ghcr.io
3339
username: ${{ github.actor }}
3440
password: ${{ secrets.GITHUB_TOKEN }}
41+
3542
- name: Build and push (Ubuntu 22.04)
3643
uses: docker/build-push-action@v4.1.1
3744
with:
@@ -41,34 +48,41 @@ jobs:
4148
push: true
4249
tags: |
4350
gameservermanagers/linuxgsm:latest
51+
gameservermanagers/linuxgsm:ubuntu
4452
gameservermanagers/linuxgsm:ubuntu-22.04
4553
ghcr.io/gameservermanagers/linuxgsm:latest
54+
ghcr.io/gameservermanagers/linuxgsm:ubuntu
4655
ghcr.io/gameservermanagers/linuxgsm:ubuntu-22.04
4756
48-
ubuntu-2004:
57+
build-ubuntu-2004:
58+
name: Build Ubuntu 20.04
4959
runs-on: ubuntu-latest
5060
steps:
5161
- name: Checkout
5262
uses: actions/checkout@v3
53-
- name: Set up QEMU
63+
64+
- name: Setup QEMU
5465
uses: docker/setup-qemu-action@v2
55-
- name: Set up Docker Buildx
66+
67+
- name: Setup Docker Buildx
5668
uses: docker/setup-buildx-action@v2.7.0
69+
5770
- name: Build
5871
run: docker build -t gameservermanagers/linuxgsm:ubuntu-20.04 -f ./Dockerfile.ubuntu-2004 .
59-
#- name: Test
60-
# run: docker run --rm gameservermanagers/linuxgsm:ubuntu-20.04 ./linuxgsm.sh list
72+
6173
- name: Login to DockerHub
6274
uses: docker/login-action@v2.2.0
6375
with:
6476
username: ${{ secrets.DOCKER_HUB_USERNAME }}
6577
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
78+
6679
- name: Login to GitHub Container Registry
6780
uses: docker/login-action@v2.2.0
6881
with:
6982
registry: ghcr.io
7083
username: ${{ github.actor }}
7184
password: ${{ secrets.GITHUB_TOKEN }}
85+
7286
- name: Build and push (Ubuntu 20.04)
7387
uses: docker/build-push-action@v4.1.1
7488
with:
@@ -80,30 +94,35 @@ jobs:
8094
gameservermanagers/linuxgsm:ubuntu-20.04
8195
ghcr.io/gameservermanagers/linuxgsm:ubuntu-20.04
8296
83-
ubuntu-1804:
97+
build-ubuntu-1804:
98+
name: Build Ubuntu 18.04
8499
runs-on: ubuntu-latest
85100
steps:
86101
- name: Checkout
87102
uses: actions/checkout@v3
88-
- name: Set up QEMU
103+
104+
- name: Setup QEMU
89105
uses: docker/setup-qemu-action@v2
90-
- name: Set up Docker Buildx
106+
107+
- name: Setup Docker Buildx
91108
uses: docker/setup-buildx-action@v2.7.0
109+
92110
- name: Build
93111
run: docker build -t gameservermanagers/linuxgsm:ubuntu-18.04 -f ./Dockerfile.ubuntu-1804 .
94-
#- name: Test
95-
# run: docker run --rm gameservermanagers/linuxgsm:ubuntu-18.04 ./linuxgsm.sh list
112+
96113
- name: Login to DockerHub
97114
uses: docker/login-action@v2.2.0
98115
with:
99116
username: ${{ secrets.DOCKER_HUB_USERNAME }}
100117
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
118+
101119
- name: Login to GitHub Container Registry
102120
uses: docker/login-action@v2.2.0
103121
with:
104122
registry: ghcr.io
105123
username: ${{ github.actor }}
106124
password: ${{ secrets.GITHUB_TOKEN }}
125+
107126
- name: Build and push (Ubuntu 18.04)
108127
uses: docker/build-push-action@v4.1.1
109128
with:

0 commit comments

Comments
 (0)