-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (49 loc) · 1.59 KB
/
ci.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
name: CI
on: [push, pull_request]
env:
dockerid: ${{ secrets.dockerid }}
dockerpass: ${{ secrets.dockerpass }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Remember if you commit this, newly built images will replace those tags.
# Prefer incrementing the version to unused one
tag: [19-android, 19-noble, 19-bookworm, 19-format, 19-mingw, 19-emscripten]
env:
dockertag: ${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build docker image
run: |
ctxpath=${dockertag//-/\/}
docker build -t openrct2/openrct2-build:$dockertag $ctxpath
- name: Publish docker image
run: |
if [ "$dockerid" != "" ]; then
docker login -u "$dockerid" -p "$dockerpass"
docker push openrct2/openrct2-build:$dockertag
else
echo 'Image not pushed'
fi
tag:
name: Tag images
needs: build
runs-on: ubuntu-latest
steps:
- name: Tag docker images
run: |
if [ "$dockerid" != "" ]; then
docker login -u "$dockerid" -p "$dockerpass"
docker pull openrct2/openrct2-build:19-noble
docker tag openrct2/openrct2-build:19-noble openrct2/openrct2-build:19
docker tag openrct2/openrct2-build:19-noble openrct2/openrct2-build:latest
docker push openrct2/openrct2-build:19
docker push openrct2/openrct2-build:latest
else
echo 'Images not tagged'
fi