chore: Create tag workflow updated #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
jobs: | |
trigger-create-tag-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if PR is merged into main | |
id: check_merged | |
run: | | |
if [ "${{ github.event.pull_request.merged }}" = "true" ] && [ "${{ github.event.pull_request.base.ref }}" = "main" ]; then | |
echo "true" | |
else | |
echo "false" | |
fi | |
- 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}} | |