-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (77 loc) · 2.34 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
name: ci-master-pr
on:
push:
branches:
- master
tags:
- '**'
pull_request:
branches:
- master
jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
BASE_IMAGE_NAME: [ubuntu]
BASE_IMAGE_TAG: [focal-20231003]
BUILD_IMAGE_VARIANT: [git, minimal]
include:
- BASE_IMAGE_TAG: focal-20231003
BUILD_IMAGE_VARIANT: git
TAG_LATEST: true
env:
BASE_REGISTRY_NAMESPACE: library
BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }}
BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }}
BUILD_REGISTRY_NAMESPACE: startersclan
BUILD_IMAGE_NAME: steamcmd
BUILD_IMAGE_VARIANT: ${{ matrix.BUILD_IMAGE_VARIANT }}
TAG_LATEST: ${{ matrix.TAG_LATEST }}
steps:
- uses: actions/checkout@v3
- name: Build, test, push image
run: |
export RELEASE_TAG_REF=$( echo "$GITHUB_REF" | sed -rn 's/^refs\/tags\/(.*)/\1/p' )
./build.sh
env:
DOCKERHUB_REGISTRY_USER: ${{ vars.DOCKERHUB_REGISTRY_USER }}
DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
update-draft-release:
needs: linux
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: linux
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:
needs: linux
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: peter-evans/dockerhub-description@v3
with:
username: ${{ vars.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
repository: ${{ vars.DOCKERHUB_REGISTRY_USER }}/steamcmd
short-description: ${{ github.event.repository.description }}
readme-filepath: README.md