-
Notifications
You must be signed in to change notification settings - Fork 853
176 lines (154 loc) · 4.94 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Free up some disk space on ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
check-latest: true
- name: Release Notes
run: ./resources/scripts/release_notes.sh > ./release_notes.md
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --release-notes=./release_notes.md --timeout 120m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Free up some disk space on ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
- name: Get secrets from AWS Secrets Manager
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/dockerhub_token
parse-json-secrets: true
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: vectorizedbot
password: ${{ env.DOCKERHUB_TOKEN }}
- name: Install Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta CGO
id: docker_meta_cgo
uses: docker/metadata-action@v5
with:
images: |
redpandadata/connect
flavor: |
latest=auto
suffix=-cgo
tags: |
type=semver,suffix=-cgo,pattern={{version}}
type=semver,suffix=-cgo,pattern={{major}}.{{minor}}
type=semver,suffix=-cgo,pattern={{major}}
- name: Build and push CGO
uses: docker/build-push-action@v6
with:
context: ./
file: ./resources/docker/Dockerfile.cgo
push: true
tags: ${{ steps.docker_meta_cgo.outputs.tags }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: |
redpandadata/connect
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./
file: ./resources/docker/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
- name: Docker meta cloud
id: docker_meta_cloud
uses: docker/metadata-action@v5
with:
images: |
redpandadata/connect
flavor: |
latest=false
suffix=-cloud
tags: |
type=semver,suffix=-cloud,pattern={{version}}
type=semver,suffix=-cloud,pattern={{major}}.{{minor}}
type=semver,suffix=-cloud,pattern={{major}}
- name: Build and push cloud
uses: docker/build-push-action@v6
with:
context: ./
file: ./resources/docker/Dockerfile.cloud
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta_cloud.outputs.tags }}
- name: Docker meta cloud AI
id: docker_meta_ai
uses: docker/metadata-action@v5
with:
images: |
redpandadata/connect
flavor: |
latest=false
suffix=-ai
tags: |
type=semver,suffix=-ai,pattern={{version}}
type=semver,suffix=-ai,pattern={{major}}.{{minor}}
type=semver,suffix=-ai,pattern={{major}}
- name: Build and push cloud
uses: docker/build-push-action@v6
with:
context: ./
file: ./resources/docker/Dockerfile.ai
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta_ai.outputs.tags }}