Skip to content

Commit

Permalink
ci: debug actions contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
refucktor committed Jul 29, 2024
1 parent 18237ad commit 4f54794
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/ff-merge-merger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ jobs:
contents: read
issues: read
outputs:
valid_commenter: ${{ steps.ff_merge_check_valid_commenter.outputs.valid_commenter }}
valid_comment: ${{ steps.ff_merge_check_comment_content.outputs.valid_comment }}
valid_label: ${{ steps.ff_merge_check_issue_labels.outputs.valid_label }}
valid_commenter: ${{ steps.ff_merge_check_valid_commenter.outputs.valid_commenter }}
valid_comment: ${{ steps.ff_merge_check_comment_content.outputs.valid_comment }}
valid_label: ${{ steps.ff_merge_check_issue_labels.outputs.valid_label }}
steps:
- name: Debug Event
uses: actions/[email protected]
with:
script: |
console.log("%O", `${{ github.event }}`);
console.log("GH_CTX_EVENT:", `${{ github.event }}`);
console.log("GH_CTX_ISSUE_COMMENT:", ${{ github.event.pull_request }});
console.log("GS_CTX_PAYLOAD :", context.payload);
core.info('GS_FULL_CTX:', context);
core.info('GS_CTX_PAYLOAD:', context.payload);
core.info('GS_CTX_REPO:', context.repo);
core.info('GH_CTX:', JSON.stringify(${{ github }}));
core.info('GH_CTX_EVENT:', JSON.stringify(${{ github.event }} ));
- name: Check Comment Author 🕵️
id: ff_merge_check_valid_commenter
Expand Down Expand Up @@ -111,9 +112,23 @@ jobs:
core.setFailed(`Action failed with error ${err}`);
}
- name: Fast-Forward Merge 🚀
- name: Fast-Forward Inspection 🕵️
id: ff_inspect
if: ${{ success() }}
uses: actions/[email protected]
with:
script: |
run: |
echo "✅ Fast-Forward Merge completed."
echo "✅ Fast-Forward Inspection completed."
echo "BASE_REF: ${{ github.base_ref }}"
echo "HEAD_REF: ${{ github.event.pull_request.head.ref }}"
# - name: Fast-Forward Merge 🚀
# id: ff_merge
# if: ${{ success() }}
# run: |
# echo "✅ Fast-Forward Merge completed."
# git checkout origin/${{ github.base_ref }}
# git merge --ff-only origin/${{ github.event.pull_request.head.ref }}
# git push origin ${{ github.base_ref }}

0 comments on commit 4f54794

Please sign in to comment.