From 3c1187b1a52aa1fec17c30a880a013ef3a3a556d Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 09:50:38 +0200 Subject: [PATCH 1/8] chore: set-output is deprecated, repair --- .github/workflows/bump.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 2e42eb7..ce9d32c 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -31,7 +31,7 @@ jobs: echo "must be of schema: vX.X.X" exit 1 fi - echo "::set-output name=input::${INPUT}" + echo "input=${INPUT}" >> "$GITHUB_OUTPUT" - name: Get Latest ZITADEL Release Version id: latest-tag @@ -51,7 +51,7 @@ jobs: echo "input tag: ${INPUT}" echo "latest tag: ${LATEST}" echo "going to target zitadel version: ${TARGET_ZITADEL_VERSION}" - echo "::set-output name=tag::${TAG}" + echo "tag=${TAG}" >> "$GITHUB_OUTPUT" - name: Parse Target ZITADEL Version into Major, Minor, Patch id: parsed-target-zitadel-version @@ -92,9 +92,9 @@ jobs: - name: Set Version Update Type id: set-version-type run: | - [ ${{ steps.parsed-target-zitadel-version.outputs.patch }} -gt ${{ steps.parsed-last-zitadel-version.outputs.patch }} ] && echo '::set-output name=type::PATCH' || true - [ ${{ steps.parsed-target-zitadel-version.outputs.minor }} -gt ${{ steps.parsed-last-zitadel-version.outputs.minor }} ] && echo '::set-output name=type::MINOR' || true - [ ${{ steps.parsed-target-zitadel-version.outputs.major }} -gt ${{ steps.parsed-last-zitadel-version.outputs.major }} ] && echo '::set-output name=type::MAJOR' || true + [ ${{ steps.parsed-target-zitadel-version.outputs.patch }} -gt ${{ steps.parsed-last-zitadel-version.outputs.patch }} ] && echo 'type=PATCH' >> "$GITHUB_OUTPUT" || true + [ ${{ steps.parsed-target-zitadel-version.outputs.minor }} -gt ${{ steps.parsed-last-zitadel-version.outputs.minor }} ] && echo 'type=MINOR' >> "$GITHUB_OUTPUT" || true + [ ${{ steps.parsed-target-zitadel-version.outputs.major }} -gt ${{ steps.parsed-last-zitadel-version.outputs.major }} ] && echo 'type=MAJOR' >> "$GITHUB_OUTPUT" || true - name: Bump Chart Version uses: jessicalostinspace/bump-semantic-version-action@v1.0.1 From 38387806236c8ff45838592913674743a4291de8 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 09:52:22 +0200 Subject: [PATCH 2/8] chore: simplify flow - use input tag directly --- .github/workflows/bump.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index ce9d32c..d9fbd76 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -31,7 +31,6 @@ jobs: echo "must be of schema: vX.X.X" exit 1 fi - echo "input=${INPUT}" >> "$GITHUB_OUTPUT" - name: Get Latest ZITADEL Release Version id: latest-tag @@ -45,7 +44,7 @@ jobs: - name: Decide on Target ZITADEL Version id: target-zitadel-version run: | - INPUT=${{ steps.check-input.outputs.input }} + INPUT=${{ github.event.inputs.tag }} LATEST=${{ steps.latest-tag.outputs.tag }} TARGET_ZITADEL_VERSION=${INPUT:-${LATEST}} echo "input tag: ${INPUT}" From 93cc3a683b2d21eede4040e3b3d8febbdd708d09 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 09:52:43 +0200 Subject: [PATCH 3/8] chore: only validate input tag when given --- .github/workflows/bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index d9fbd76..ea530bd 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -22,7 +22,7 @@ jobs: pull-requests: write steps: - name: Validate the manually given input tag, if any - if: ${{github.event_name == 'workflow_dispatch'}} + if: ${{github.event_name == 'workflow_dispatch'}} && ${{github.event.inputs.tag}} id: check-input run: | INPUT=${{github.event.inputs.tag}} From 1c64f70a4faa67f138ef5654c9d159f9e0a249ec Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 10:09:40 +0200 Subject: [PATCH 4/8] chore: trying to placate the github action syntax gods --- .github/workflows/bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index ea530bd..633f7d9 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -22,7 +22,7 @@ jobs: pull-requests: write steps: - name: Validate the manually given input tag, if any - if: ${{github.event_name == 'workflow_dispatch'}} && ${{github.event.inputs.tag}} + if: ${{ (github.event_name == 'workflow_dispatch') && (github.event.inputs.tag != '') }} id: check-input run: | INPUT=${{github.event.inputs.tag}} From b069b3840546d99937f094754f4e3ec6b4320226 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 10:14:49 +0200 Subject: [PATCH 5/8] chore: switch to release-kit/semver@v2 to parse semvers chore: use release-kit/semver@v2 with source string --- .github/workflows/bump.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 633f7d9..49ed778 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -50,13 +50,14 @@ jobs: echo "input tag: ${INPUT}" echo "latest tag: ${LATEST}" echo "going to target zitadel version: ${TARGET_ZITADEL_VERSION}" - echo "tag=${TAG}" >> "$GITHUB_OUTPUT" + echo "tag=${TARGET_ZITADEL_VERSION}" >> $GITHUB_OUTPUT - name: Parse Target ZITADEL Version into Major, Minor, Patch id: parsed-target-zitadel-version - uses: booxmedialtd/ws-action-parse-semver@v1 + uses: release-kit/semver@v2 with: - input_string: ${{ steps.target-zitadel-version.outputs.tag }} + source: string + string: ${{ steps.target-zitadel-version.outputs.tag }} - id: checkout uses: actions/checkout@v3 @@ -84,9 +85,10 @@ jobs: - name: Parse Currently ZITADEL Version into Major, Minor, Patch id: parsed-last-zitadel-version - uses: booxmedialtd/ws-action-parse-semver@v1 + uses: release-kit/semver@v2 with: - input_string: ${{ steps.current-zitadel-version.outputs.data }} + source: 'string' + string: ${{ steps.current-zitadel-version.outputs.data }} - name: Set Version Update Type id: set-version-type From c699755d3453217815814607ef353560e74c5b4e Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 10:20:16 +0200 Subject: [PATCH 6/8] chore: use $GITHUB_OUTPUT without escaping --- .github/workflows/bump.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 49ed778..5b8fc90 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -93,9 +93,9 @@ jobs: - name: Set Version Update Type id: set-version-type run: | - [ ${{ steps.parsed-target-zitadel-version.outputs.patch }} -gt ${{ steps.parsed-last-zitadel-version.outputs.patch }} ] && echo 'type=PATCH' >> "$GITHUB_OUTPUT" || true - [ ${{ steps.parsed-target-zitadel-version.outputs.minor }} -gt ${{ steps.parsed-last-zitadel-version.outputs.minor }} ] && echo 'type=MINOR' >> "$GITHUB_OUTPUT" || true - [ ${{ steps.parsed-target-zitadel-version.outputs.major }} -gt ${{ steps.parsed-last-zitadel-version.outputs.major }} ] && echo 'type=MAJOR' >> "$GITHUB_OUTPUT" || true + [ ${{ steps.parsed-target-zitadel-version.outputs.patch }} -gt ${{ steps.parsed-last-zitadel-version.outputs.patch }} ] && echo 'type=PATCH' >> $GITHUB_OUTPUT || true + [ ${{ steps.parsed-target-zitadel-version.outputs.minor }} -gt ${{ steps.parsed-last-zitadel-version.outputs.minor }} ] && echo 'type=MINOR' >> $GITHUB_OUTPUT || true + [ ${{ steps.parsed-target-zitadel-version.outputs.major }} -gt ${{ steps.parsed-last-zitadel-version.outputs.major }} ] && echo 'type=MAJOR' >> $GITHUB_OUTPUT || true - name: Bump Chart Version uses: jessicalostinspace/bump-semantic-version-action@v1.0.1 From 137a70ba2d1cb8682627ea2a4b60eaacf1f3a687 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 10:38:59 +0200 Subject: [PATCH 7/8] chore: repair deprecations --- .github/workflows/bump.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 5b8fc90..72295ad 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -110,7 +110,6 @@ jobs: valueFile: 'charts/zitadel/Chart.yaml' propertyPath: 'appVersion' value: ${{ steps.target-zitadel-version.outputs.tag }} - updateFile: true commitChange: false createPR: false @@ -120,7 +119,6 @@ jobs: valueFile: 'charts/zitadel/Chart.yaml' propertyPath: 'version' value: ${{ steps.bumped-chart-version.outputs.bumped-semantic-version }} - updateFile: true commitChange: false createPR: false From 63ed8927cbc9987aca535c2904351001b08f1ca4 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Fri, 23 Aug 2024 10:44:38 +0200 Subject: [PATCH 8/8] chore: update create-pull-request dependency Old version was too old --- .github/workflows/bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 72295ad..e8a5f30 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -127,7 +127,7 @@ jobs: - name: Create Pull Request id: pull-request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: title: Bump ZITADEL Version branch: create-pull-request/bump