diff --git a/.github/workflows/release-update-metadata.yaml b/.github/workflows/release-update-metadata.yaml index d0068cbad..e031977c2 100644 --- a/.github/workflows/release-update-metadata.yaml +++ b/.github/workflows/release-update-metadata.yaml @@ -5,18 +5,17 @@ concurrency: on: pull_request: - types: - - opened - - synchronize branches: - - release-please--branches--main--components-* + - main jobs: getChangedChart: + if: startsWith(github.head_ref, 'release-please--branches--main--components--') uses: ./.github/workflows/get-changed-chart.yaml with: pr_number: ${{ github.event.pull_request.number }} update-metadata-files: + if: startsWith(github.head_ref, 'release-please--branches--main--components--') runs-on: ubuntu-latest needs: getChangedChart name: update metadata file for release @@ -25,12 +24,13 @@ jobs: CHART: ${{ needs.getChangedChart.outputs.chart }} steps: - name: Validate changed chart - if: ${{ needs.getChangedChart.outputs.found == 'true' }} + if: ${{ needs.getChangedChart.outputs.found != 'true' }} run: | echo 'No chart has been changed?' >&2 exit 1 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: + ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 token: ${{ secrets.ACTIONS_BOT_TOKEN }}