diff --git a/.github/actions/bulk-release-chart/action.yaml b/.github/actions/bulk-release-chart/action.yaml index 94e65f26..b0215fa6 100644 --- a/.github/actions/bulk-release-chart/action.yaml +++ b/.github/actions/bulk-release-chart/action.yaml @@ -262,7 +262,7 @@ runs: - name: find pr comment uses: peter-evans/find-comment@v3 - if: inputs.comment-enabled == 'true' + if: ${{ inputs.comment-enabled == 'true' && contains(fromJSON('["true"]'), fromJSON(inputs.release-info).new-release-published) }} id: find-pr-comment with: issue-number: ${{ fromJSON(inputs.release-info).pr-number }} @@ -271,7 +271,7 @@ runs: - name: comment on release success id: release-pr-comment - if: inputs.comment-enabled == 'true' + if: ${{ inputs.comment-enabled == 'true' && contains(fromJSON('["true"]'), fromJSON(inputs.release-info).new-release-published) }} uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.find-pr-comment.outputs.comment-id }} diff --git a/.github/actions/bulk-release-container/action.yaml b/.github/actions/bulk-release-container/action.yaml index 89b9384c..1bbebfa0 100644 --- a/.github/actions/bulk-release-container/action.yaml +++ b/.github/actions/bulk-release-container/action.yaml @@ -379,7 +379,7 @@ runs: - name: find pr comment uses: peter-evans/find-comment@v3 - if: inputs.comment-enabled == 'true' + if: ${{ inputs.comment-enabled == 'true' && contains(fromJSON('["true"]'), fromJSON(inputs.release-info).new-release-published) }} id: find-pr-comment with: issue-number: ${{ fromJSON(inputs.release-info).pr-number }} @@ -388,7 +388,7 @@ runs: - name: comment on release success id: release-pr-comment - if: inputs.comment-enabled == 'true' + if: ${{ inputs.comment-enabled == 'true' && contains(fromJSON('["true"]'), fromJSON(inputs.release-info).new-release-published) }} uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.find-pr-comment.outputs.comment-id }} @@ -397,7 +397,7 @@ runs: body: | #### ${{ inputs.comment-header }} - ${{ inputs.job-name }} - :label: Commit: ${{ github.sha }} - :gear: Workflow: [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) ``` - ${{ steps.semantic.outputs.git-tag }} + ${{ fromJSON(inputs.release-info).git-tag }} ${{ steps.meta.outputs.tags }} ${{ env.EXTRA_META }} ${{ steps.build-release.outputs.digest }} diff --git a/.github/actions/release-chart/action.yaml b/.github/actions/release-chart/action.yaml index 6917bae1..412c69a0 100644 --- a/.github/actions/release-chart/action.yaml +++ b/.github/actions/release-chart/action.yaml @@ -319,7 +319,7 @@ runs: - name: find pr comment uses: peter-evans/find-comment@v3 - if: inputs.comment-enabled == 'true' && steps.release.outcome == 'success' + if: inputs.comment-enabled == 'true' && steps.semantic.outputs.new-release-published == 'true' id: find-pr-comment with: issue-number: ${{ steps.semantic.outputs.pr-number }} @@ -328,7 +328,7 @@ runs: - name: comment on release success id: release-pr-comment - if: inputs.comment-enabled == 'true' && steps.release.outcome == 'success' + if: inputs.comment-enabled == 'true' && steps.semantic.outputs.new-release-published == 'true' uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.find-pr-comment.outputs.comment-id }} diff --git a/.github/actions/release-container/action.yaml b/.github/actions/release-container/action.yaml index cf41c9fa..d92c531f 100644 --- a/.github/actions/release-container/action.yaml +++ b/.github/actions/release-container/action.yaml @@ -445,7 +445,7 @@ runs: - name: comment on release success id: release-pr-comment - if: inputs.comment-enabled == 'true' && steps.release.outcome == 'success' + if: inputs.comment-enabled == 'true' && steps.release.outcome == 'success' && steps.semantic.outputs.new-release-published == 'true' uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.find-pr-comment.outputs.comment-id }} diff --git a/.github/workflows/bulk-pr-and-release-chart.yaml b/.github/workflows/bulk-pr-and-release-chart.yaml index fd92920b..2b113154 100644 --- a/.github/workflows/bulk-pr-and-release-chart.yaml +++ b/.github/workflows/bulk-pr-and-release-chart.yaml @@ -114,7 +114,7 @@ jobs: registry-token: ${{ secrets.registry-token }} - name: release - if: github.event_name == 'push' + if: github.event_name == 'push' && inputs.release-info != '' uses: ./.tmp/.github/actions/bulk-release-chart with: job-name: ${{ inputs.job-name }} diff --git a/.github/workflows/bulk-pr-and-release-container.yaml b/.github/workflows/bulk-pr-and-release-container.yaml index ff683d3d..36a63f11 100644 --- a/.github/workflows/bulk-pr-and-release-container.yaml +++ b/.github/workflows/bulk-pr-and-release-container.yaml @@ -125,7 +125,7 @@ jobs: cosign-password: ${{ secrets.cosign-password }} - name: release - if: github.event_name == 'push' + if: github.event_name == 'push' && inputs.release-info != '' uses: ./.tmp/.github/actions/bulk-release-container with: job-name: ${{ inputs.job-name }}