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.post44.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8111669c6ffb1944b828d8a70df5c4ae5f34745bf90a4d64dbe52ddfddd1a8a6 |
|
MD5 | aedffb9507f16fd6107c92efe7bef12d |
|
BLAKE2b-256 | 3b43b9c300078735290f102790d28e193e41a4d83b088c47097b6e13703d2c2f |
Hashes for actions_includes-0.0.post44-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebe0b0d6f887a879618bba378785296ad337c8746fdf519cf06b5a66743c0e8e |
|
MD5 | b7bd6e7049d95730320ee87540de8a07 |
|
BLAKE2b-256 | b447792ae6dab24fe8a10e84c673050264c36aee5fe07d5a4b12d6895d2b2bca |
Hashes for actions_includes-0.0.post44-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528106ce88807cc9b39f4c7ba26b350839f75c0cc78cc78a7be9d8cf2cc35240 |
|
MD5 | 14d33495c305344c53cfe7c5479204bf |
|
BLAKE2b-256 | fc7344ef5e7d268ec4166c8c457f8ead750c6fa3229589d8346afe05d05b26e7 |
Hashes for actions_includes-0.0.post44-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa5fe93c658113ca8f1e47b886e20d1ffa3a8d754c7b00b3261d3720a791f133 |
|
MD5 | 4a7e64c9b97115e7006e9e807e7445f7 |
|
BLAKE2b-256 | 9348b20098d19d74a77ee976b49a4a80596a0deb6ca64a7a5ae2802f178002c1 |