-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
156 lines (130 loc) · 4.52 KB
/
release.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
name: Release
'on':
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- v*-rc*
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: '^1.21.0'
- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install go-task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- name: Install rpm
run: |
sudo apt update && sudo apt-get install rpm
- name: Install deps
run: |
task deps
- name: Import gnupg
run: |
echo "${{ secrets.GPG_KEY }}" | tr " " "\n" | base64 -d | gpg --import --batch
gpg --sign -u "58A7 CC3D 8A9C A2E5 BB5C 141D 4064 23EA F814 63CA" --pinentry-mode loopback --yes --batch --passphrase "${{ secrets.GPG_PASS }}" --output unlock.sig --detach-sign README.md
rm -f unlock.sig
- name: Reset repo
run: |
git reset --hard
- name: Run release
run: |
GITHUB_TOKEN=${{ secrets.GH_TOKEN }} task release:prod
deploy-prod:
runs-on: ubuntu-latest
if: github.repository_owner == 'semaphoreui'
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup qemu
id: qemu
uses: docker/setup-qemu-action@v3
- name: Setup buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Hub login
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Server meta
id: server
uses: docker/metadata-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: |
semaphoreui/semaphore
labels: |
org.opencontainers.image.vendor=SemaphoreUI
maintainer=Semaphore UI <[email protected]>
tags: |
type=raw,value=${{ github.ref_name }}
flavor: |
latest=true
- name: Server build
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: deployment/docker/server/Dockerfile
platforms: linux/amd64,linux/arm64 # ,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.server.outputs.labels }}
tags: ${{ steps.server.outputs.tags }}
- name: Server build with Ansible 2.16.5
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
build-args: |
ANSIBLE_VERSION=9.4.0
file: deployment/docker/server/Dockerfile
platforms: linux/amd64,linux/arm64 # ,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.server.outputs.labels }}
tags: ${{ steps.server.outputs.tags }}-ansible2.16.5
- name: Runner meta
id: runner
uses: docker/metadata-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: |
semaphoreui/runner
labels: |
org.opencontainers.image.vendor=SemaphoreUI
maintainer=Semaphore UI <[email protected]>
tags: |
type=raw,value=${{ github.ref_name }}
flavor: |
latest=true
- name: Runner build
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: deployment/docker/runner/Dockerfile
platforms: linux/amd64,linux/arm64 #,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.runner.outputs.labels }}
tags: ${{ steps.runner.outputs.tags }}
- name: Runner build with Ansible 2.16.5
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: deployment/docker/runner/Dockerfile
platforms: linux/amd64,linux/arm64 #,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.runner.outputs.labels }}
tags: ${{ steps.runner.outputs.tags }}-ansible2.16.5