-
Notifications
You must be signed in to change notification settings - Fork 9
78 lines (65 loc) · 2.89 KB
/
custom-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
---
name: custom-release
on:
workflow_dispatch:
inputs:
version:
description: "version tag to use for custom release"
required: true
env:
GO_VERSION: "1.21"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: install devspace
run: |
curl -L -o devspace \
"https://github.com/loft-sh/devspace/releases/download/${{ vars.DEVSPACE_VERSION}}/devspace-linux-amd64" &&
install -c -m 0755 devspace /usr/local/bin
working-directory: /tmp
- name: login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push images
run: |
devspace run build --profile custom-release --var RELEASE_VERSION=${{ github.event.inputs.version }}
# packaging charts but *not* uploading them to ghcr, only to artifacts repo; mostly this is
# so we can have a process for testing ci bits w/out actually cutting a release and/or being
# on main. note that we also update the values files (only the stuff that gets packaged, we
# don't commit this back to the repo or anything silly like that) to the release hash so that
# when using the chart(s) in the artifacts the images are already set to the associated hash.
- name: package charts
run: |
RELEASE_VERSION=0.0.0
make set-chart-versions $RELEASE_VERSION
export CLICKER_IMAGE="ghcr.io/srl-labs/clabernetes/clabernetes-clicker:${{ github.event.inputs.version }}"
echo "clicker image->" $CLICKER_IMAGE
yq -i eval '.image = strenv(CLICKER_IMAGE)' charts/clicker/values.yaml
export MANAGER_IMAGE="ghcr.io/srl-labs/clabernetes/clabernetes-manager:${{ github.event.inputs.version }}"
export LAUNCHER_IMAGE="ghcr.io/srl-labs/clabernetes/clabernetes-launcher:${{ github.event.inputs.version }}"
echo "manager image->" $MANAGER_IMAGE
echo "launcher image->" $LAUNCHER_IMAGE
yq -i eval '.manager.image = strenv(MANAGER_IMAGE)' charts/clabernetes/values.yaml
yq -i eval '.launcher.image = strenv(LAUNCHER_IMAGE)' charts/clabernetes/values.yaml
helm package charts/clicker --version $RELEASE_VERSION
helm package charts/clabernetes --version $RELEASE_VERSION
- name: archive packaged helm clicker chart
uses: actions/upload-artifact@v3
with:
name: clicker-0.0.0.tgz
path: clicker-0.0.0.tgz
retention-days: 30
- name: archive packaged helm clabernetes chart
uses: actions/upload-artifact@v3
with:
name: clabernetes-0.0.0.tgz
path: clabernetes-0.0.0.tgz
retention-days: 30