From c0945ff912d3e89770c534d36ffea639922527ba Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Thu, 4 Apr 2024 13:38:48 +0200 Subject: [PATCH] Create v3 --- .github/workflows/helm-publish.yaml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/helm-publish.yaml b/.github/workflows/helm-publish.yaml index 991ddb27..01db220f 100644 --- a/.github/workflows/helm-publish.yaml +++ b/.github/workflows/helm-publish.yaml @@ -6,13 +6,40 @@ on: - "**" jobs: + get-gradle-version: + name: Get Gradle Version + runs-on: ubuntu-22.04 + outputs: + version: ${{ steps.get-version.outputs.version }} + steps: + - name: Check out repository + uses: bakdata/ci-templates/actions/checkout@1.32.0 + + - name: Set up Gradle with version ${{ inputs.gradle-version }} + uses: bakdata/ci-templates/actions/java-gradle-setup@1.42.0 + with: + java-distribution: "microsoft" + java-version: "11" + gradle-version: "wrapper" + gradle-cache: "true" + gradle-cache-read-only: "false" + + - name: Get version + id: get-version + run: | + version=$(./gradlew properties -q | grep "^version:" | awk '{print $2}' | tr -d '[:space:]' | xargs) + echo "version=$version" >> "$GITHUB_OUTPUT" + shell: bash + call-workflow-passing-data: name: Publish Helm chart - uses: bakdata/ci-templates/.github/workflows/helm-multi-release.yaml@v1.13.4 + uses: bakdata/ci-templates/.github/workflows/helm-multi-release.yaml@feature/helm-snapshots + needs: get-gradle-version with: charts-path: "./charts" subdirs: "['producer-app','producer-app-cleanup-job','rclone-copy','streams-app','streams-app-cleanup-job']" gh-pages-branch: gh-pages + version: ${{ needs.get-gradle-version.outputs.version }} secrets: github-username: ${{ secrets.GH_USERNAME }} github-email: ${{ secrets.GH_EMAIL }}