From 1f0b5525c6399fd50d599f6d98a8022011fdff69 Mon Sep 17 00:00:00 2001 From: Mitchell Nielsen Date: Wed, 9 Oct 2024 13:42:12 -0500 Subject: [PATCH] Update prefect-operator version in CCD (#110) Updates the prefect-operator image and chart versions in CCD on releases. Depends on https://github.com/PrefectHQ/platform/pull/7603 Related to https://linear.app/prefect/issue/PLA-343/automatically-update-prefect-operator-helm-chart-versions-in-ccd-to --- .github/workflows/helm-release.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 0ef6640..358146d 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -13,6 +13,9 @@ jobs: # GitHub considers creating releases and uploading assets as writing contents. contents: write runs-on: ubuntu-latest + outputs: + releaseVersion: ${{ steps.output_versions.outputs.releaseVersion }} + operatorVersion: ${{ steps.output_versions.outputs.operatorVersion }} steps: - name: Checkout uses: actions/checkout@v4 @@ -35,6 +38,12 @@ jobs: git ls-remote --tags --refs --sort="v:refname" \ origin 'v[0-9].[0-9].[0-9]' | tail -n1 | sed 's/.*\///' | sed 's/v//')" >> $GITHUB_ENV + - name: Output versions as GitHub Outputs + id: output_versions + run: | + echo "releaseVersion=$RELEASE_VERSION" >> $GITHUB_OUTPUT + echo "operatorVersion=$OPERATOR_VERSION" >> $GITHUB_OUTPUT + - name: Configure Git run: | git config user.name "${GITHUB_ACTOR}" @@ -101,3 +110,19 @@ jobs: [v$IMAGE_VERSION](https://github.com/PrefectHQ/prefect-operator/releases/tag/v$IMAGE_VERSION)" env: GH_TOKEN: ${{ github.token }} + + update_helm_chart_version_downstream: + name: Update Helm Chart version & image version in `cloud2-cluster-deployment` + needs: release + runs-on: ubuntu-latest + steps: + - name: Run workflow + run: | + gh workflow run update-prefect-operator-versions.yaml \ + --repo prefecthq/cloud2-cluster-deployment \ + --ref main \ + -f image_version=${{ needs.release.outputs.operatorVersion }} \ + -f chart_version=${{ needs.release.outputs.releaseVersion }} \ + -f mode=release + env: + GH_TOKEN: ${{ secrets.CLOUD2_CLUSTER_DEPLOYMENT_ACTIONS_RW }}