chore: Create tag workflow updated #4
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: | |
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 | |
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 |