Skip to content

GitHub

Updating JSON objects used in a GitHub matrix

I have been using GitHub workflows and found that I can dynamically build JSON objects and use them to run GitHub workflow job variations using the GitHub matrix strategy. Each new workflow and each dynamically built JSON object can require some troubleshooting, especially if customizations are made compared to other workflows.

Note

This is a follow up to the Updating JSON objects with JQ blog when using JSON objects within a GitHub workflow.

GitHub Actions Project Matrix

Some of my project Build Workflows use the GitHub matrix strategy to process individual builds. Sometimes I will need to troubleshoot the PROJECT_GH_MATRIX variable locally; this post provides information about using the PROJECT_GH_MATRIX variable locally when working with the JSON objects.

Run Python in a composite GitHub Action

To pass output from a Python script within a step of a GitHub Actions workflow, you will be able to write the variable using GitHub's specified GITHUB_OUTPUT environment variable using Python's open function with the a (append) mode.

Enable debug for verbose GitHub Actions

!!!? info

This post is incomplete and will be updated in the future.

If you are using composite actions that support their own verbose mode, you may find you only want to enable verbose mode when the GitHub runner is in debug mode. The variable we need to know is runner.debug, which is also stored as RUNNER_DEBUG.