Skip to content

Commit

Permalink
git-flow-automerge: Debug GitHub actions boolean statement
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitronx committed Sep 20, 2023
1 parent a8dfea6 commit 11c7511
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/git-flow-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ jobs:
outputs:
sha: ${{ steps.master_branch.outputs.sha }}
authorized: ${{ steps.check_user_permissions.outputs.require-result }}
debug-automerge:
runs-on: ubuntu-latest
needs: master-branch
steps:
- name: Debug needs.master-branch.outputs.authorized
run: echo ${{ needs.master-branch.outputs.authorized }}
- name: Debug Authorized == true
run: echo DEBUG AUTHZ = ${{ needs.master-branch.outputs.authorized == true }}
- name: Debug Authorized fromJson
run: echo DEBUG AUTHZ = ${{ fromJSON(needs.master-branch.outputs.authorized) }}
- name: Debug Authorized fromJson to Boolean ... fromJSON(needs.master-branch.outputs.authorized) == true
run: echo DEBUG AUTHZ = ${{ fromJSON(needs.master-branch.outputs.authorized) == true }}
- name: Debug Authorized cast to String, then boolean check ...format('{0}', needs.master-branch.outputs.authorized) == 'true'
run: echo DEBUG AUTHZ = ${{ format('{0}', needs.master-branch.outputs.authorized) == 'true' }}
- name: Debug FULL Boolean
run: echo DEBUG BOOLEAN = ${{ needs.master-branch.outputs.authorized == true && github.event.pull_request.merged == true && (contains(github.event.pull_request.labels.*.name, 'release') || github.event.label.name == 'release') }}
automerge:
if: needs.master-branch.outputs.authorized == true && github.event.pull_request.merged == true && (contains(github.event.pull_request.labels.*.name, 'release') || github.event.label.name == 'release')
runs-on: ubuntu-latest
Expand Down

0 comments on commit 11c7511

Please sign in to comment.