Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Skip following steps if no dispatch should happen #16

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ runs:
echo "type=$type" >> $GITHUB_OUTPUT
- name: Check if should dispatch workflow
id: checkshoulddispatch
shell: bash
env:
RUN_BRANCHES_ON_PREVIOUS_MAJOR: "false"
@@ -38,11 +39,14 @@ runs:
major_type=$(echo $TYPE | cut -d "," -f 1)
if [[ $RUN_BRANCHES_ON_PREVIOUS_MAJOR == "false" ]] && [[ $major_type == "previous" ]]; then
echo "Workflow is configured to not dispatch workflow for branches on previous major. Exiting."
echo "do_dispatch=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "do_dispatch=true" >> $GITHUB_OUTPUT
- name: Get branch
id: getbranch
if: steps.checkshoulddispatch.outputs.do_dispatch == 'true'
shell: bash
env:
TYPE: ${{ steps.gettype.outputs.type }}
@@ -119,6 +123,7 @@ runs:
echo "branch=$branch" >> $GITHUB_OUTPUT
- name: Send API request
if: steps.checkshoulddispatch.outputs.do_dispatch == 'true'
shell: bash
env:
GITHUB_REPOSITORY: ${{ github.repository }}