From 21ddfea94d2240208b186c7580a43bc8023f065b Mon Sep 17 00:00:00 2001 From: Mitchell Nielsen Date: Wed, 9 Oct 2024 14:11:19 -0500 Subject: [PATCH] Update dev image version in CCD on main merge (#112) * Update dev image version in CCD on main merge Related to https://linear.app/prefect/issue/PLA-343/automatically-update-prefect-operator-helm-chart-versions-in-ccd-to * Quote GITHUB_ENV Co-authored-by: Jamie Zieziula --------- Co-authored-by: Jamie Zieziula --- .github/workflows/images-main.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/images-main.yaml b/.github/workflows/images-main.yaml index efed849..9ab2fea 100644 --- a/.github/workflows/images-main.yaml +++ b/.github/workflows/images-main.yaml @@ -28,3 +28,30 @@ jobs: image: prefect-operator-dev # this is required so that the workflow can read secrets rom the environment secrets: inherit + + update_image_version_downstream: + name: Update dev/stg image versions in `cloud2-cluster-deployment` + needs: build_and_push_image_for_main + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get image version + run: | + short_sha="$(git rev-parse --short=7 HEAD)" + echo "SHORT_SHA=$short_sha" >> $GITHUB_ENV + + - name: Run workflow + run: | + gh workflow run update-prefect-operator-versions.yaml \ + --repo prefecthq/cloud2-cluster-deployment \ + --ref main \ + -f image_version=$SHORT_SHA \ + -f mode=main-merge + env: + GH_TOKEN: ${{ secrets.CLOUD2_CLUSTER_DEPLOYMENT_ACTIONS_RW }}