diff --git a/.github/workflows/check_version.yml b/.github/workflows/check_version.yml index c151108..eccc5d2 100644 --- a/.github/workflows/check_version.yml +++ b/.github/workflows/check_version.yml @@ -2,6 +2,10 @@ name: Check Version on: workflow_call: + secrets: + TRIGGER_NEXT_ACTION: + required: true + description: 'Trigger Next Action' pull_request: branches: diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml index 86c987c..41a8ccc 100644 --- a/.github/workflows/create_tag.yml +++ b/.github/workflows/create_tag.yml @@ -16,9 +16,13 @@ jobs: call-check-version: uses: ./.github/workflows/check_version.yml + secrets: + TRIGGER_NEXT_ACTION: ${{ secrets.TRIGGER_NEXT_ACTION }} call-trigger-create-tag-and-publish: uses: ./.github/workflows/trigger_on_pr_merge.yml + secrets: + TRIGGER_CREATE_TAG_AND_PUBLISH: ${{ secrets.TRIGGER_CREATE_TAG_AND_PUBLISH }} create-tag-and-publish: permissions: @@ -31,7 +35,7 @@ jobs: needs: [placeholder-job, call-check-version, call-trigger-create-tag-and-publish] - if: ${{ needs.call-check-version.outputs.TRIGGER_NEXT_ACTION == 'true' && needs.call-trigger-create-tag-and-publish.outputs.TRIGGER_CREATE_TAG_AND_PUBLISH == 'true' }} + if: ${{ needs.call-check-version.TRIGGER_NEXT_ACTION == 'true' && needs.call-trigger-create-tag-and-publish.TRIGGER_CREATE_TAG_AND_PUBLISH == 'true' }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/trigger_on_pr_merge.yml b/.github/workflows/trigger_on_pr_merge.yml index 7c43060..f8d594e 100644 --- a/.github/workflows/trigger_on_pr_merge.yml +++ b/.github/workflows/trigger_on_pr_merge.yml @@ -2,7 +2,14 @@ name: Trigger Create Tag and Publish Workflow on PR Merge on: workflow_call: - + secrets: + TRIGGER_CREATE_TAG_AND_PUBLISH: + required: true + description: | + Set to true to trigger the Create Tag and Publish workflow. + Set to false to not trigger the Create Tag and Publish workflow. + Set to anything else to not trigger the Create Tag and Publish workflow. + pull_request: types: - closed @@ -23,6 +30,7 @@ jobs: - name: Set trigger_create_tag_and_publish output id: set_output + run: echo "set-env:TRIGGER_CREATE_TAG_AND_PUBLISH=${{ steps.check_merged.outputs.outputs.result}}" >> $GITHUB_ENV env: TRIGGER_CREATE_TAG_AND_PUBLISH: ${{ steps.check_merged.outputs.outputs.result}} - run: echo "set-env:TRIGGER_CREATE_TAG_AND_PUBLISH=${{ steps.check_merged.outputs.outputs.result}}" >> $GITHUB_ENV \ No newline at end of file + \ No newline at end of file