-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 2.02 KB
/
automaticRelease.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
48
49
50
name: Trigger release on new Helm version
on:
schedule:
- cron: '0 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check_for_new_helm_version:
name: Update on new release
runs-on: ubuntu-20.04
steps:
-
run: sudo apt-get install -y jq
-
uses: actions/checkout@v3
-
name: Compare releases
id: compare_releases
run: |
eval $(scripts/checkHelmVersion.sh)
echo "triggerNewRelease=${triggerNewRelease}" | tee -a $GITHUB_OUTPUT
echo "helmRelease=${helmRelease}" | tee -a $GITHUB_OUTPUT
-
uses: stefanzweifel/git-auto-commit-action@v4
if: steps.compare_releases.outputs.triggerNewRelease == 'true'
with:
commit_message: Updated to latest Helm version v${{ steps.compare_releases.outputs.helmRelease }}
-
name: Create release on new Helm version
if: steps.compare_releases.outputs.triggerNewRelease == 'true'
uses: "actions/create-release@v1"
env:
# here we are using the CR_PAT token because the generated GITHUB_TOKEN did not trigger
# the publishImage workflow on a new release (https://github.community/t/triggering-a-new-workflow-from-another-workflow/16250)
GITHUB_TOKEN: ${{ secrets.CR_PAT }}
with:
tag_name: "${{ steps.compare_releases.outputs.helmRelease }}-1"
release_name: "${{ steps.compare_releases.outputs.helmRelease }}-1"
body: |
The following versions are bundled with this release:
- [Helm](https://www.helm.sh):${{ steps.compare_releases.outputs.helmRelease }}
- [Helm-kubeval](https://github.com/instrumenta/helm-kubeval):0.13.0
- [Helm-values](https://github.com/shihyuho/helm-values):1.2.0
The image can be pulled with `$ docker pull ghcr.io/cloudogu/helm:${{ steps.compare_releases.outputs.helmRelease }}-1`
draft: false
prerelease: false