Tool for flattening include statements in GitHub actions workflow.yml files.
Project description
actions-includes
Allows including an action inside another action (by preprocessing the Yaml file).
Instead of using uses
or run
in your action step, use the keyword includes
.
Once you are using the includes
argument, the workflows can be expanded using
the tool like follows;
# python -m actions_include <input-workflow-with-includes> <output-workflow-flattened>
python -m actions_includes ./.github/workflows-src/workflow-a.yml ./.github/workflows/workflow-a.yml
steps:
- name: Other step
run: |
command
- includes: {action-name}
with:
{inputs}
- name: Other step
run: |
command
The {action-name}
follows the same syntax as the standard GitHub action
uses
and the action referenced should look exactly like a
GitHub "composite action"
except runs.using
should be includes
.
For example;
{owner}/{repo}@{ref}
- Public action ingithub.com/{owner}/{repo}
{owner}/{repo}/{path}@{ref}
- Public action under{path}
ingithub.com/{owner}/{repo}
../{path}
- Local action under local{path}, IE
./.github/actions/my-action`.
As it only makes sense to reference composite actions, the docker://
form isn't supported.
As you frequently want to include local actions, actions-includes
extends the
{action-name}
syntax to also support;
/{name}
- Local action under./.github/actions/{name}
.
This is how composite actions should have worked.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for actions-includes-0.0.post29.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e041832b46049c7bc876ff4fb177ea9178192958efae504f4051934a8057c0a7 |
|
MD5 | e0d980c70c5bccf25bea9a75aa45be33 |
|
BLAKE2b-256 | 14a95a71943744676443ac2a96d5aa04d8333bc34ed8bc2c87a3ee21020dd473 |
Hashes for actions_includes-0.0.post29-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58816c89339ac497424f8c1b456acc3fd3112bf6a2dc65a8947f80b4fb57d85a |
|
MD5 | 9927ad2d1e400c20c6958cd88f41923a |
|
BLAKE2b-256 | 8e227a9ddb19b736343e70574e7560fa8c4fcdb6a7b8a78769087968785a7bcf |
Hashes for actions_includes-0.0.post29-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f99c41bbe0d1da3d559880e9004166c8d57ba38814e3bbeab19d45083a95ef4c |
|
MD5 | 5869f8f332a675bd76894289e35a5eca |
|
BLAKE2b-256 | 82bb2837c9876ece798990e97f895e71f6d64bf15ad744e8a56794f5d1d6c626 |
Hashes for actions_includes-0.0.post29-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af47653dee127d3d1ecc029ed3b56d7e7f844bff4617c5ed514d8c9b76392cd |
|
MD5 | e66f1add0a3e895208d7ab1aacbb7792 |
|
BLAKE2b-256 | 541b83da702ff0563c1ec79e1c69ed488ce80c87b5db543e12bf2c2656c5e673 |