-
Notifications
You must be signed in to change notification settings - Fork 33
47 lines (42 loc) · 1.76 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
name: Release Charts
on:
release:
types:
- created
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Parse release description
id: split_description
uses: winterjung/split@v2
with:
msg: ${{ github.event.release.body }}
- name: Set vars
id: vars
run: |
component_name_1=`echo "${{ steps.split_description.outputs._0 }}" | tr -d ':'`
component_name_2=`echo "${{ steps.split_description.outputs._2 }}" | tr -d ':'`
version_1=`echo "${{ steps.split_description.outputs._1 }}" | tr -d ','`
version_2=`echo "${{ steps.split_description.outputs._3 }}" | tr -d ','`
echo "::set-output name=${component_name_1}::$version_1"
echo "::set-output name=${component_name_2}::$version_2"
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
- name: Trigger release workflow in csi-baremetal-operator repo
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Release Charts
repo: dell/csi-baremetal-operator
token: ${{ secrets.CSI_WF_TOKEN }}
ref: refs/heads/master # need to hardcode here because of this issue: https://github.com/benc-uk/workflow-dispatch/issues/11
inputs: |
{ "csi_version": "${{ steps.vars.outputs.csi_version }}",
"csi_operator_version": "${{ steps.vars.outputs.csi_operator_version }}",
"release_tag": "${{ github.event.release.tag_name }}",
"branch": "${{ github.event.release.target_commitish }}",
"prerelease": ${{ github.event.release.prerelease }} }
if: startsWith(github.ref, 'refs/tags/')