Skip to content

Commit 5e965fa

Browse files
committed
update all distros
1 parent ba54634 commit 5e965fa

File tree

1 file changed

+32
-61
lines changed

1 file changed

+32
-61
lines changed

.github/workflows/docker-publish.yml

Lines changed: 32 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,7 @@ jobs:
7474
- name: Setup QEMU
7575
uses: docker/setup-qemu-action@v3
7676

77-
- name: Setup Docker Buildx
78-
uses: docker/setup-buildx-action@v3
79-
80-
- name: Build
81-
run: docker build -t gameservermanagers/steamcmd:ubuntu-22.04 -f ./Dockerfile.ubuntu-2204 .
82-
83-
- name: Login to DockerHub
77+
- name: Login to Docker Hub
8478
uses: docker/login-action@v3
8579
with:
8680
username: ${{ secrets.DOCKER_HUB_USERNAME }}
@@ -93,16 +87,28 @@ jobs:
9387
username: ${{ github.actor }}
9488
password: ${{ secrets.GITHUB_TOKEN }}
9589

90+
- name: Extract metadata (tags, labels) for Docker
91+
id: meta
92+
uses: docker/metadata-action@v5
93+
with:
94+
images: |
95+
gameservermanagers/steamcmd
96+
ghcr.io/gameservermanagers/steamcmd
97+
tags: |
98+
latest
99+
ubuntu
100+
ubuntu-22.04
101+
96102
- name: Build and push (Ubuntu 22.04)
97103
uses: docker/build-push-action@v6
98104
with:
99105
context: .
100106
file: ./Dockerfile.ubuntu-2204
101107
platforms: linux/amd64
102108
push: true
103-
tags: |
104-
gameservermanagers/steamcmd:ubuntu-22.04
105-
ghcr.io/gameservermanagers/steamcmd:ubuntu-22.04
109+
tags: ${{ steps.meta.outputs.tags }}
110+
labels: ${{ steps.meta.outputs.labels }}
111+
106112

107113
build-ubuntu-2004:
108114
name: Build Ubuntu 20.04
@@ -119,14 +125,8 @@ jobs:
119125
- name: Setup QEMU
120126
uses: docker/setup-qemu-action@v3
121127

122-
- name: Setup Docker Buildx
123-
uses: docker/setup-buildx-action@v3
124-
125-
- name: Build
126-
run: docker build -t gameservermanagers/steamcmd:ubuntu-20.04 -f ./Dockerfile.ubuntu-2004 .
127-
128-
- name: Login to DockerHub
129-
uses: docker/login-action@v3.3.0
128+
- name: Login to Docker Hub
129+
uses: docker/login-action@v3
130130
with:
131131
username: ${{ secrets.DOCKER_HUB_USERNAME }}
132132
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
@@ -138,60 +138,31 @@ jobs:
138138
username: ${{ github.actor }}
139139
password: ${{ secrets.GITHUB_TOKEN }}
140140

141-
- name: Build and push (Ubuntu 20.04)
142-
uses: docker/build-push-action@v6
141+
- name: Extract metadata (tags, labels) for Docker
142+
id: meta
143+
uses: docker/metadata-action@v5
143144
with:
144-
context: .
145-
file: ./Dockerfile.ubuntu-2004
146-
platforms: linux/amd64
147-
push: true
145+
images: |
146+
gameservermanagers/steamcmd
147+
ghcr.io/gameservermanagers/steamcmd
148148
tags: |
149-
gameservermanagers/steamcmd:ubuntu-20.04
150-
ghcr.io/gameservermanagers/steamcmd:ubuntu-20.04
151-
152-
build-ubuntu-1804:
153-
name: Build Ubuntu 18.04
154-
runs-on: ubuntu-latest
155-
steps:
156-
- name: Checkout
157-
uses: actions/checkout@v4
158-
159-
- name: Setup QEMU
160-
uses: docker/setup-qemu-action@v3
161-
162-
- name: Setup Docker Buildx
163-
uses: docker/setup-buildx-action@v3
164-
165-
- name: Build
166-
run: docker build -t gameservermanagers/steamcmd:ubuntu-18.04 -f ./Dockerfile.ubuntu-1804 .
167-
168-
- name: Login to DockerHub
169-
uses: docker/login-action@v3.3.0
170-
with:
171-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
172-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
149+
latest
150+
ubuntu
151+
ubuntu-20.04
173152
174-
- name: Login to GitHub Container Registry
175-
uses: docker/login-action@v3
176-
with:
177-
registry: ghcr.io
178-
username: ${{ github.actor }}
179-
password: ${{ secrets.GITHUB_TOKEN }}
180-
181-
- name: Build and push (Ubuntu 18.04)
153+
- name: Build and push (Ubuntu 20.04)
182154
uses: docker/build-push-action@v6
183155
with:
184156
context: .
185-
file: ./Dockerfile.ubuntu-1804
157+
file: ./Dockerfile.ubuntu-2004
186158
platforms: linux/amd64
187159
push: true
188-
tags: |
189-
gameservermanagers/steamcmd:ubuntu-18.04
190-
ghcr.io/gameservermanagers/steamcmd:ubuntu-18.04
160+
tags: ${{ steps.meta.outputs.tags }}
161+
labels: ${{ steps.meta.outputs.labels }}
191162

192163
package-cleanup:
193164
name: Cleanup Old GitHub Packages
194-
needs: [ build-ubuntu-1804, build-ubuntu-2004, build-ubuntu-2204, build-ubuntu-2404 ]
165+
needs: [ build-ubuntu-2004, build-ubuntu-2204, build-ubuntu-2404 ]
195166
runs-on: ubuntu-latest
196167
steps:
197168
- name: Delete Package Versions

0 commit comments

Comments
 (0)