Skip to content

.github/workflows/automaticRelease.yml #1898

.github/workflows/automaticRelease.yml

.github/workflows/automaticRelease.yml #1898

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-latest
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
notify_failure:
permissions:
issues: write
contents: read
uses: ./.github/workflows/notify_failure.yml

Check failure on line 57 in .github/workflows/automaticRelease.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/automaticRelease.yml

Invalid workflow file

error parsing called workflow ".github/workflows/automaticRelease.yml" -> "./.github/workflows/notify_failure.yml" (source branch with sha:b452769c675c9a9b88f778e449241a586c79a55a) : (Line: 17, Col: 9): Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.needs_job
needs: [ check_for_new_helm_version ]
if: failure()
with:
needs_job: check_for_new_helm_version