-
-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (51 loc) · 1.47 KB
/
publish_images.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
57
name: Build docker images
on:
push:
branches:
- main
paths:
- 'Dockerfile'
- '.github/workflows/publish_images.yml'
env:
DOCKER_IMAGE: brammys/necesse-server
jobs:
build:
name: Build ${{matrix.version}}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
include:
- version: 0-26-1
build: 15396124
url: https://necessegame.com/content/server/0-26-1-15396124/necesse-server-linux64-0-26-1-15396124.zip
latest: true
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_IMAGE }}
tags: |
type=raw,value=latest
type=raw,value=${{matrix.version}}
type=raw,value=${{matrix.version}}-${{matrix.build}}
- name: Build and export to Docker hub
uses: docker/build-push-action@v3
with:
push: true
context: .
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
url=${{matrix.url}}
version=${{matrix.version}}
build=${{matrix.build}}