From 034e783d91dd5b497dfee9151da9f5e21313b7fc Mon Sep 17 00:00:00 2001 From: Warren Lee <5959690+wrn14897@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:29:09 -0700 Subject: [PATCH] ci: add step to notify helm-charts workflow --- .github/workflows/release.yml | 36 ++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7658add1..5e780dd99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,8 +94,37 @@ jobs: needs.check_changesets.outputs.changeset_outputs_hasChangesets == 'false' run: make ${{ matrix.release }} - notify_downstream: - name: Notify Downstream + notify_helm_charts: + name: Notify Helm-Charts Downstream + needs: [check_changesets, release] + runs-on: ubuntu-24.04 + if: + needs.check_changesets.outputs.changeset_outputs_hasChangesets == 'false' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Load Environment Variables from .env + uses: xom9ikk/dotenv@v2 + - name: Notify Helm-Charts Downstream + uses: actions/github-script@v7 + continue-on-error: true + env: + TAG: ${{ env.IMAGE_VERSION }}${{ env.IMAGE_VERSION_SUB_TAG }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { TAG } = process.env; + const result = await github.rest.actions.createWorkflowDispatch({ + owner: 'hyperdxio', + repo: 'helm-charts', + workflow_id: '${{ secrets.DOWNSTREAM_HC_WORKFLOW_ID }}', + ref: 'main', + inputs: { + tag: TAG + } + }); + notify_ch: + name: Notify CH Downstream needs: [check_changesets, release] runs-on: ubuntu-24.04 if: @@ -112,8 +141,9 @@ jobs: app-id: ${{ secrets.DOWNSTREAM_CH_APP_ID }} private-key: ${{ secrets.DOWNSTREAM_CH_APP_PRIVATE_KEY }} owner: ${{ secrets.DOWNSTREAM_CH_OWNER }} - - name: Notify Downstream + - name: Notify CH Downstream uses: actions/github-script@v7 + continue-on-error: true env: TAG: ${{ env.IMAGE_VERSION }}${{ env.IMAGE_VERSION_SUB_TAG }} with: