Giter VIP home page Giter VIP logo

debug's Introduction

๐Ÿฉบ 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.

debug's People

Contributors

dariuszporowski avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.