Skip to content

Blog

Supporting dynamic multiline variables in GitHub Actions

One of the challenges when building reusable GitHub Actions workflows is handling multiline variables that need to be passed from configuration files to actions. This is particularly common when working with actions that require formatted input strings, like the hashicorp/vault-action which expects secrets in a specific multiline format.

In this post, I plan to store multiline variables in JSON arrays and dynamically load them in GitHub Actions workflows with support for prefixes to reduce duplication.

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.

Which doc should I read?

Writing documentation is good, but only if it is useful for the intended audience. As I continue to build out this wiki, I thought it would be helpful to provide additional context about the types of documents that are here.

Reference Docs vs. Guides

Reference docs explain what a tool is and why it's used, while guides provide step-by-step instructions for completing specific tasks once you're ready to take action.

Agile Story vs Task

Note

This is meant to be way to help understand and develop a process for tracking work in a distributed team.

Agile Story vs Task

In Agile frameworks like Scrumban, understanding the distinction between a task and a story is crucial for effective project management. A user story is typically functionality that will be visible to end users and captures requirements and acceptance criteria from the user's perspective. Developing a user story usually involves multiple roles such as a programmer, tester, user interface designer, or analyst, indicating that it contains multiple types of work. 03

Work tracking in a distributed team

Note

This is meant to be a visual overview of how to manage issues as part of an overall work tracking process.

As mentioned in the Using Scrumban in a distributed team post, using Sprints to plan and define the work that will be completed can be extremely helpful in a distributed team. There should be a formally established process to follow in order to help everyone understand expectations. In this scenario, we can find out how we can use GitHub issues to plan and track work which can be helpful given the recent changes the GitHub team is making to issues and projects.