@@ -3,35 +3,42 @@ name: Docker Publish
3
3
on :
4
4
workflow_dispatch :
5
5
push :
6
- branches : ["main", "master"]
6
+ branches : " main"
7
+ paths :
8
+ - Dockerfile*
7
9
schedule :
8
- - cron : " 0 23 * * * "
10
+ - cron : " 0 2 * * 6 "
9
11
10
12
jobs :
11
- ubuntu-2204 :
13
+ build-ubuntu-2204 :
14
+ name : Build Ubuntu 22.04
12
15
runs-on : ubuntu-latest
13
16
steps :
14
17
- name : Checkout
15
18
uses : actions/checkout@v3
16
- - name : Set up QEMU
19
+
20
+ - name : Setup QEMU
17
21
uses : docker/setup-qemu-action@v2
18
- - name : Set up Docker Buildx
22
+
23
+ - name : Setup Docker Buildx
19
24
uses : docker/setup-buildx-action@v2.7.0
25
+
20
26
- name : Build
21
27
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
+
24
29
- name : Login to DockerHub
25
30
uses : docker/login-action@v2.2.0
26
31
with :
27
32
username : ${{ secrets.DOCKER_HUB_USERNAME }}
28
33
password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
34
+
29
35
- name : Login to GitHub Container Registry
30
36
uses : docker/login-action@v2.2.0
31
37
with :
32
38
registry : ghcr.io
33
39
username : ${{ github.actor }}
34
40
password : ${{ secrets.GITHUB_TOKEN }}
41
+
35
42
- name : Build and push (Ubuntu 22.04)
36
43
uses : docker/build-push-action@v4.1.1
37
44
with :
@@ -41,34 +48,41 @@ jobs:
41
48
push : true
42
49
tags : |
43
50
gameservermanagers/linuxgsm:latest
51
+ gameservermanagers/linuxgsm:ubuntu
44
52
gameservermanagers/linuxgsm:ubuntu-22.04
45
53
ghcr.io/gameservermanagers/linuxgsm:latest
54
+ ghcr.io/gameservermanagers/linuxgsm:ubuntu
46
55
ghcr.io/gameservermanagers/linuxgsm:ubuntu-22.04
47
56
48
- ubuntu-2004 :
57
+ build-ubuntu-2004 :
58
+ name : Build Ubuntu 20.04
49
59
runs-on : ubuntu-latest
50
60
steps :
51
61
- name : Checkout
52
62
uses : actions/checkout@v3
53
- - name : Set up QEMU
63
+
64
+ - name : Setup QEMU
54
65
uses : docker/setup-qemu-action@v2
55
- - name : Set up Docker Buildx
66
+
67
+ - name : Setup Docker Buildx
56
68
uses : docker/setup-buildx-action@v2.7.0
69
+
57
70
- name : Build
58
71
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
+
61
73
- name : Login to DockerHub
62
74
uses : docker/login-action@v2.2.0
63
75
with :
64
76
username : ${{ secrets.DOCKER_HUB_USERNAME }}
65
77
password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
78
+
66
79
- name : Login to GitHub Container Registry
67
80
uses : docker/login-action@v2.2.0
68
81
with :
69
82
registry : ghcr.io
70
83
username : ${{ github.actor }}
71
84
password : ${{ secrets.GITHUB_TOKEN }}
85
+
72
86
- name : Build and push (Ubuntu 20.04)
73
87
uses : docker/build-push-action@v4.1.1
74
88
with :
@@ -80,30 +94,35 @@ jobs:
80
94
gameservermanagers/linuxgsm:ubuntu-20.04
81
95
ghcr.io/gameservermanagers/linuxgsm:ubuntu-20.04
82
96
83
- ubuntu-1804 :
97
+ build-ubuntu-1804 :
98
+ name : Build Ubuntu 18.04
84
99
runs-on : ubuntu-latest
85
100
steps :
86
101
- name : Checkout
87
102
uses : actions/checkout@v3
88
- - name : Set up QEMU
103
+
104
+ - name : Setup QEMU
89
105
uses : docker/setup-qemu-action@v2
90
- - name : Set up Docker Buildx
106
+
107
+ - name : Setup Docker Buildx
91
108
uses : docker/setup-buildx-action@v2.7.0
109
+
92
110
- name : Build
93
111
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
+
96
113
- name : Login to DockerHub
97
114
uses : docker/login-action@v2.2.0
98
115
with :
99
116
username : ${{ secrets.DOCKER_HUB_USERNAME }}
100
117
password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
118
+
101
119
- name : Login to GitHub Container Registry
102
120
uses : docker/login-action@v2.2.0
103
121
with :
104
122
registry : ghcr.io
105
123
username : ${{ github.actor }}
106
124
password : ${{ secrets.GITHUB_TOKEN }}
125
+
107
126
- name : Build and push (Ubuntu 18.04)
108
127
uses : docker/build-push-action@v4.1.1
109
128
with :
0 commit comments