Skip to content

Commit

Permalink
Move within PR step above retrospective step
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Mar 26, 2024
1 parent 9eede40 commit 94e4efe
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ runs:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2

- name: Determine new tag version
if: ${{ inputs.pr_body == '' && inputs.pr_number == '' }}
- name: Determine new tag version from PR event
if: ${{ inputs.pr_body != '' && inputs.pr_number != ''}}
shell: sh
id: determine_next_tag
id: determine_next_tag_from_pr_event
# User controlled input needs to be santitised beforehand e.g., by adding an
# intermediate env var to prevent the workflow being exposed to a critical
# command injection attack
env:
PR_BODY: "${{ fromJson(steps.get_pr_data.outputs.result).body }}"
PR_NUMBER: "${{ fromJson(steps.get_pr_data.outputs.result).number }}"
PR_BODY: "${{ inputs.pr_body }}"
PR_NUMBER: "${{ inputs.pr_number }}"
run: |
echo "Attempting to auto-tag merge commit"
echo "Attempting to auto-tag merge commit2"
script_output=$("${{ github.action_path }}/auto-tag.sh" "${PR_BODY}" "${PR_NUMBER}")
if $? != 0; then
exit 1
Expand All @@ -72,18 +72,18 @@ runs:
echo "New tag: ${new_tag}"
echo "new_tag=${new_tag}" >> "$GITHUB_OUTPUT"
- name: Determine new tag version from PR event
if: ${{ inputs.pr_body != '' && inputs.pr_number != ''}}
- name: Determine new tag version
if: ${{ inputs.pr_body == '' && inputs.pr_number == '' }}
shell: sh
id: determine_next_tag_from_pr_event
id: determine_next_tag
# User controlled input needs to be santitised beforehand e.g., by adding an
# intermediate env var to prevent the workflow being exposed to a critical
# command injection attack
env:
PR_BODY: "${{ inputs.pr_body }}"
PR_NUMBER: "${{ inputs.pr_number }}"
PR_BODY: "${{ fromJson(steps.get_pr_data.outputs.result).body }}"
PR_NUMBER: "${{ fromJson(steps.get_pr_data.outputs.result).number }}"
run: |
echo "Attempting to auto-tag merge commit2"
echo "Attempting to auto-tag merge commit"
script_output=$("${{ github.action_path }}/auto-tag.sh" "${PR_BODY}" "${PR_NUMBER}")
if $? != 0; then
exit 1
Expand Down

0 comments on commit 94e4efe

Please sign in to comment.