Debug #21500
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: Debug | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main, '[0-9]+-[0-9]+-*'] | |
types: | |
[ | |
assigned, | |
unassigned, | |
labeled, | |
unlabeled, | |
opened, | |
edited, | |
closed, | |
reopened, | |
synchronize, | |
converted_to_draft, | |
ready_for_review, | |
locked, | |
unlocked, | |
review_requested, | |
review_request_removed, | |
auto_merge_enabled, | |
auto_merge_disabled, | |
] | |
pull_request_review: | |
types: [submitted, edited, dismissed] | |
check_run: | |
type: [created, rerequested, completed, requested_action] | |
check_suite: | |
type: [completed] | |
workflow_run: | |
workflows: ['Debug for Dependabot', 'Build'] | |
types: [completed, requested] | |
workflow_dispatch: | |
jobs: | |
debug_information: | |
name: Debug Information | |
if: ${{ github.actor != 'dependabot[bot]' || github.event_name == 'workflow_run' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print events | |
env: | |
EVENT_NAME: ${{ github.event_name }} | |
EVENT_ACTION: ${{ github.event.action }} | |
WORKFLOW_NAME: ${{ github.event.workflow.name }} | |
WORKFLOW_URL: ${{ github.event.workflow.html_url }} | |
WORKFLOW_RUN_EVENT: ${{ github.event.workflow_run.event }} | |
WORKFLOW_RUN_URL: ${{ github.event.workflow_run.html_url }} | |
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} | |
run: | | |
echo "::notice::Event name: $EVENT_NAME" | |
echo "::notice::Event action: $EVENT_ACTION" | |
if [ -n "$WORKFLOW_NAME" ] | |
then | |
echo "::notice::Workflow Name: $WORKFLOW_NAME" | |
echo "::notice::Workflow URL: $WORKFLOW_URL" | |
echo "::notice::Workflow run event: $WORKFLOW_RUN_EVENT" | |
echo "::notice::Workflow run URL: $WORKFLOW_RUN_URL" | |
echo "::notice::Workflow run ID: $WORKFLOW_RUN_ID" | |
fi | |
- name: Print contexts | |
env: | |
GITHUB: ${{ toJSON(github) }} | |
JOB: ${{ toJSON(job) }} | |
INPUTS: ${{ toJSON(inputs) }} | |
run: | | |
echo "::debug::github = | |
$GITHUB" | |
echo "::debug::job = | |
$JOB" | |
echo "::debug::inputs = | |
$INPUTS" | |
- name: Create JSON files | |
id: create-json-files | |
env: | |
GITHUB: ${{ toJSON(github) }} | |
JOB: ${{ toJSON(job) }} | |
INPUTS: ${{ toJSON(inputs) }} | |
run: | | |
TEMP_JSON_DIRECTORY="$(mktemp -d)" | |
echo "$GITHUB" > "$TEMP_JSON_DIRECTORY/github.json" | |
echo "$JOB" > "$TEMP_JSON_DIRECTORY/job.json" | |
echo "$INPUTS" > "$TEMP_JSON_DIRECTORY/inputs.json" | |
echo "temp-json-directory=$TEMP_JSON_DIRECTORY" >> $GITHUB_OUTPUT | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: debug | |
path: ${{ steps.create-json-files.outputs.temp-json-directory }} | |
retention-days: 30 |