-
Notifications
You must be signed in to change notification settings - Fork 185
45 lines (38 loc) · 1.28 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
# The CI will create a release branch
# with CR updated with release tag
# The workflow will trigger when a release tag is created
name: ChaosCharts-Release
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# It will checkout to the relase branch provided in the secret
- name: Checkout to release branch
run: |
git config --local user.email "[email protected]"
git config --local user.name "LitmusChaos"
git checkout -b ${{ secrets.RELEASE_BRANCH }}
# It will update the image tag as provided in the secret
- name: Update the chaos-charts version
run: |
find charts -type f -exec sed -i 's/\:latest/\:${{ secrets.RELEASE_VERSION }}/g' {} \;
- name: Commit files
run: |
git add .
git commit -s -m "New Release ${{ secrets.RELEASE_VERSION }}"
# It will push the changes in realse branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ secrets.RELEASE_BRANCH }}