-
Notifications
You must be signed in to change notification settings - Fork 10
73 lines (63 loc) · 2.18 KB
/
stable-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
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Authors of Nimbus
name: Stable release
on:
create:
tags:
- "v*"
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-nimbus-image:
if: github.repository == '5GSEC/nimbus'
name: Build and push nimbus image
uses: ./.github/workflows/release-image.yaml
with:
WORKING_DIRECTORY: .
NAME: nimbus
secrets: inherit
release-adapters-image:
if: github.repository == '5GSEC/nimbus'
strategy:
matrix:
adapters: [ "nimbus-kubearmor", "nimbus-netpol", "nimbus-kyverno", "nimbus-k8tls" ]
name: Build and push ${{ matrix.adapters }} adapter's image
uses: ./.github/workflows/release-image.yaml
with:
WORKING_DIRECTORY: ./pkg/adapter/${{ matrix.adapters }}
NAME: ${{ matrix.adapters }}
secrets: inherit
update-image-tags-in-helm-charts:
if: github.repository == '5GSEC/nimbus'
needs: [ release-nimbus-image, release-adapters-image ]
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Get tag
id: tag
run: |
if [ ${{ github.ref }} == "refs/heads/main" ]; then
echo "tag=latest" >> $GITHUB_OUTPUT
else
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
fi
- name: Update images tag
run: |
./scripts/update-image-tag.sh ${{ steps.tag.outputs.tag }}
- name: Create PR to update images tag in Helm charts
uses: peter-evans/create-pull-request@v7
with:
branch: update-helm-${{ steps.tag.outputs.tag }}
commit-message: "[skip ci] Update Helm Chart To ${{ steps.update.outputs.STABLE_VERSION }}"
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
title: "[skip ci] Update Helm Chart To ${{ steps.update.outputs.STABLE_VERSION }}"
base: main
signoff: true
delete-branch: true