forked from startersclan/docker-sourceservers
-
Notifications
You must be signed in to change notification settings - Fork 0
183 lines (174 loc) · 5.2 KB
/
ci-master-pr.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: ci-master-pr
on:
push:
branches:
- master
tags:
- '**'
pull_request:
branches:
- master
jobs:
test-build-hlds:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test build
run: |
./build.sh --env-file ./test/build-hlds-cstrike.env
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: Test update
run: |
./build.sh --env-file ./test/update-hlds-cstrike.env
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
test-build-srcds:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test build
run: |
./build.sh --env-file ./test/build-srcds-hl2mp.env
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: Test update
run: |
./build.sh --env-file ./test/update-srcds-hl2mp.env
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
test-game-image-game-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test
run: |
./test/test-game-image-game-version.sh
test-generate-gitbranches:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all branches and tags
- name: Test
shell: pwsh
run: |
./Generate-GitBranches.Tests.ps1
update-draft-release:
needs:
- test-build-hlds
- test-build-srcds
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-draft-release:
needs:
- test-build-hlds
- test-build-srcds
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
publish: true
name: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3'
tag: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dockerhub-description-hlds:
runs-on: ubuntu-latest
needs:
- test-build-hlds
if: github.ref == 'refs/heads/master'
strategy:
matrix:
ENGINE: [hlds]
GAME: [cstrike, czero, dmc, dod, gearbox, ricochet, tfc, valve]
include:
- ENGINE: hlds
GAME: cstrike
GAME_FULLNAME: 'Counter-Strike 1.6'
- ENGINE: hlds
GAME: czero
GAME_FULLNAME: 'Counter-Strike: Condition Zero'
- ENGINE: hlds
GAME: dmc
GAME_FULLNAME: 'Deathmatch Classic'
- ENGINE: hlds
GAME: dod
GAME_FULLNAME: 'Day of Defeat'
- ENGINE: hlds
GAME: gearbox
GAME_FULLNAME: 'Opposing Force'
- ENGINE: hlds
GAME: ricochet
GAME_FULLNAME: 'Ricochet'
- ENGINE: hlds
GAME: tfc
GAME_FULLNAME: 'Team Fortress Classic'
- ENGINE: hlds
GAME: valve
GAME_FULLNAME: 'Half-Life'
steps:
- uses: actions/checkout@v3
- uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
repository: ${{ vars.REGISTRY_GOLDSOURCE }}/${{ matrix.GAME }}
short-description: ${{ matrix.GAME_FULLNAME }} (${{ matrix.ENGINE }}) 🐳
readme-filepath: docs/image/readme/${{ matrix.ENGINE }}-${{ matrix.GAME }}.md
dockerhub-description-srcds:
runs-on: ubuntu-latest
needs:
- test-build-srcds
if: github.ref == 'refs/heads/master'
strategy:
matrix:
ENGINE: [srcds]
GAME: [cs2, csgo, cstrike, dod, hl2mp, left4dead, left4dead2, tf]
include:
- ENGINE: srcds
GAME: cs2
GAME_FULLNAME: 'Counter-Strike 2'
- ENGINE: srcds
GAME: csgo
GAME_FULLNAME: 'Counter-Strike: Global Offensive'
- ENGINE: srcds
GAME: cstrike
GAME_FULLNAME: 'Counter-Strike: Source'
- ENGINE: srcds
GAME: dod
GAME_FULLNAME: 'Day of Defeat: Source'
- ENGINE: srcds
GAME: hl2mp
GAME_FULLNAME: 'Half-Life 2: Deathmatch'
- ENGINE: srcds
GAME: left4dead
GAME_FULLNAME: 'Left 4 Dead'
- ENGINE: srcds
GAME: left4dead2
GAME_FULLNAME: 'Left 4 Dead 2'
- ENGINE: srcds
GAME: tf
GAME_FULLNAME: 'Team Fortress 2'
steps:
- uses: actions/checkout@v3
- uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
repository: ${{ vars.REGISTRY_SOURCE }}/${{ matrix.GAME }}
short-description: ${{ matrix.GAME_FULLNAME }} (${{ matrix.ENGINE }}) 🐳
readme-filepath: docs/image/readme/${{ matrix.ENGINE }}-${{ matrix.GAME }}.md