-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 1.65 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
name: Release
on:
push:
tags:
- 'v[0-9]*.[0-9]*.[0-9]*'
jobs:
prepare:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
# Check Versions
- name: Check If Versions Match
run: |
cargo_version=$(cargo pkgid | cut -d'#' -f 2)
helm_version=$(yq .version charts/rustcloak-operator/Chart.yaml)
helm_appversion=$(yq .appVersion charts/rustcloak-operator/Chart.yaml)
set -x
test "${cargo_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_appversion}" = "${GITHUB_REF_NAME}"
build:
needs: prepare
runs-on: 'ubuntu-latest'
strategy:
matrix:
target:
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-build
name: Build
with:
target: ${{ matrix.target }}
use-cross: true
container:
needs:
- build
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: withlazers/container-action@main
with:
repository: rustcloak-operator
username: gottox
password: ${{ secrets.DOCKER_TOKEN }}
ref-tags: ${{ github.ref_name }}
dockerfile: ./Dockerfile
archs: "amd64"
release:
needs:
- container
- build
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: withlazers/release-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh_key: ${{ secrets.HELMCHART_SSH_DEPLOY_KEY }}
artifacts: "*"
helm_chart: rustcloak-operator