-
Notifications
You must be signed in to change notification settings - Fork 13
150 lines (128 loc) · 4.57 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- "*"
jobs:
build:
name: Build and Test OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
runs-on: ubuntu-latest
strategy:
matrix:
otp: [25]
elixir: [1.15]
env:
MIX_ENV: prod
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
- uses: actions/cache@v1
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- uses: actions/cache@v1
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Generate operator manifest
run: make generate-k8s-manifests
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
includeInvalidCommits: true
- name: Upload manifest to release
if: always()
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: spawn_operator/spawn_operator/manifest.yaml
tag: ${{ github.ref }}
overwrite: true
file_glob: true
body: ${{ steps.changelog.outputs.changes }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Verify Authentication
run: echo ${{ secrets.GHCR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push spawn proxy image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile-proxy
push: true
tags: ghcr.io/eigr/spawn-proxy:latest,ghcr.io/eigr/spawn-proxy:1.4.2
github-token: ${{ secrets.GHCR_PAT }}
- name: Build and push spawn operator image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile-operator
push: true
tags: ghcr.io/eigr/spawn-operator:latest,ghcr.io/eigr/spawn-operator:1.4.2
github-token: ${{ secrets.GHCR_PAT }}
- name: Build and push spawn initializer image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile-initializer
push: true
tags: ghcr.io/eigr/spawn-initializer:latest,ghcr.io/eigr/spawn-initializer:1.4.2
github-token: ${{ secrets.GHCR_PAT }}
- name: Install Zig
run: |
ZIG_VERSION=0.13.0
wget https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz
tar -xf zig-linux-x86_64-${ZIG_VERSION}.tar.xz
sudo mv zig-linux-x86_64-${ZIG_VERSION} /usr/local/zig
sudo ln -s /usr/local/zig/zig /usr/local/bin/zig
- name: Verify Zig installation
run: zig version
- name: Install 7zip
run: sudo apt-get update && sudo apt-get install -y p7zip-full
- name: Generate CLI
run: make build-cli
- name: Upload CLI binaries to release
if: always()
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: spawnctl/burrito_out/spawnctl*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
body: ${{ steps.changelog.outputs.changes }}
- name: Upload scripts to install binaries
if: always()
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: spawnctl/install.*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
body: ${{ steps.changelog.outputs.changes }}
- uses: BobAnkh/add-contributors@master
with:
CONTRIBUTOR: "### Contributors"
COLUMN_PER_ROW: "6"
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
IMG_WIDTH: "100"
FONT_SIZE: "14"
PATH: "/CONTRIBUTORS.md"
COMMIT_MESSAGE: "docs(README): update contributors"
AVATAR_SHAPE: "round"