GitHub Action
envsubst-gnu-utility
v1.0.1
Latest version
This action substitute the values of environment variables using envsubst. envsubst is a GNU gettext https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Substitute env
uses: fhgbaguidi/envsubst-action@v1.0.0
with:
input-file: 'deployment.yaml'
output-file: 'new-deployment.yaml'
env:
IMAGE_NAME: 'my-custom-image:1.0.0'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Substitute env
uses: fhgbaguidi/envsubst-action@v1.0.0
with:
input-file-pattern: '*.yaml'
output-file-suffix: '.subst'
IMAGE_NAME: 'my-custom-image:1.0.0'
With this last configuration, your output filename will be: deployment.yaml.subst
.
Warning
|
Only one of input-file and input-file-pattern can be use at the time.
|
Name | Description | Default value |
---|---|---|
working-directory |
The working directory of the action |
. |
input-file |
Path to the input file. Needs |
|
output-file |
Path to the output file. Needs |
|
input-file-pattern |
Pattern of input files. Will be used with GNU |
|
output-file-suffix |
Suffix that will be added to filenames for output files when using |
|