Skip to content

๐Ÿฉบ Dump GitHub contexts and Runner environment, and post action webhook payloads to the SMEE.io

License

Notifications You must be signed in to change notification settings

raven-actions/debug

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ Debug Action

GitHub - marketplace GitHub - release GitHub - ci GitHub - license

This GitHub Action allows you to quickly and easily dump GitHub contexts and Runner environment and post action webhook payloads to the SMEE.io service, giving you a comprehensive overview of the current state of your GitHub workflow. This can be useful for developing, troubleshooting, debugging GitHub workflows or actions, or understanding how different components interact.

  • Action is platform-independent and tested on all the latest GitHub-hosted runners (ubuntu-latest, macos-latest, windows-latest).
  • The output of each dump is in the JSON format as much as possible.

demo

Table of Contents

๐Ÿค” Usage

Quick Start

Just place in your GitHub workflow steps:

- name: Debug
  uses: raven-actions/debug@v1

Extra contexts

By default, composite action cannot access contexts like vars, secrets needs, inputs. So if you want to include them in the dump, you must specify them explicitly. For more details, follow ๐Ÿ“ฅ Inputs section.

โš ๏ธ secrets contexts will not show your secrets in the log! It's masked *** by default.

- name: Debug
  uses: raven-actions/debug@v1
  with:
    vars-context: ${{ toJson(vars) }}  # optional
    secrets-context: ${{ toJson(secrets) }}  # optional
    needs-context: ${{ toJson(needs) }}  # optional
    inputs-context: ${{ toJson(inputs) }}  # optional

Run only when GitHub debug logging enabled

In certain circumstances (e.g., re-run failing workflow), if you'd like to run Debug Action only when GitHub debug logging is enabled, then set env on workflow or job level:

env:
  DEBUG: ${{ secrets.ACTIONS_RUNNER_DEBUG || vars.ACTIONS_RUNNER_DEBUG || secrets.ACTIONS_STEP_DEBUG || vars.ACTIONS_STEP_DEBUG || false }}

and add if: ${{ env.DEBUG == 'true' }} condition to the action.

- name: Debug
  if: ${{ env.DEBUG == 'true' }}
  uses: raven-actions/debug@v1
  with:
    vars-context: ${{ toJson(vars) }}  # optional
    secrets-context: ${{ toJson(secrets) }}  # optional
    needs-context: ${{ toJson(needs) }}  # optional
    inputs-context: ${{ toJson(inputs) }}  # optional

SMEE.io

โš ๏ธ This feature is intended for debugging purposes only and should not be used to handle sensitive data. Additionally, please be aware that any authentication does not secure SMEE.io, and anyone with the channel ID can access your payloads.

Aid in debugging GitHub Action runs by expertly posting webhook payloads to SMEE.io.

To access the channel, please make sure you have a browser tab open to the channel URL.

- name: Debug
  id: debug
  uses: raven-actions/debug@v1
  with:
    smee: true  # optional, if not set then default is `false`
    smee-channel: my-custom-channel-name # optional, if not set then default is `repositoryOwner-repositoryName`, e.g. raven-actions-debug

- name: Debug outputs
  if: ${{ steps.debug.outputs.smee == 'true' }}  # example usage
  run: |
    echo "Your SMEE.io URL is: ${{ steps.debug.outputs.smee-url }}"

๐Ÿ“ฅ Inputs

Name Required Type Default value Description
vars-context false json object not set The context for the vars must be explicitly provided, as it is unavailable in the composite actions.
secrets-context false json object not set The context for the secrets must be explicitly provided, as it is unavailable in the composite actions.
needs-context false json object not set The context for the needs must be explicitly provided, as it is unavailable in the composite actions.
inputs-context false json object not set The context for the inputs must be explicitly provided, as it is unavailable in the composite actions.
smee false bool false Aid in debugging GitHub Action runs by expertly posting webhook payloads to SMEE.io.
smee-channel false string not set If the SMEE channel ID is not provided, the ID of the repository will be utilized instead.

๐Ÿ“ค Outputs

Name Type Description
smee-url string The SMEE URL to use. If SMEE is not used, it will be empty.

๐Ÿ‘ฅ Contributing

Contributions to the project are welcome! Please follow Contributing Guide.

๐Ÿ“„ License

This project is distributed under the terms of the MIT license.