Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/actions-able/envsubst-action
Github action of envsubst (utility of GNU gettext https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html)
https://github.com/actions-able/envsubst-action
github-actions hacktoberfest utility
Last synced: 10 days ago
JSON representation
Github action of envsubst (utility of GNU gettext https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html)
- Host: GitHub
- URL: https://github.com/actions-able/envsubst-action
- Owner: actions-able
- Created: 2023-01-19T14:14:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T06:28:38.000Z (11 days ago)
- Last Synced: 2024-10-27T07:32:31.022Z (11 days ago)
- Topics: github-actions, hacktoberfest, utility
- Language: Shell
- Homepage:
- Size: 22.5 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Envsubst GitHub Action
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== Substitute envs in exactly one file
[source,yaml]
----
- uses: actions/checkout@v4
with:
fetch-depth: 0- name: envsubst-gnu-utility
uses: actions-able/envsubst-action@v1
with:
input-file: 'deployment.yaml'
output-file: 'new-deployment.yaml'
env:
IMAGE_NAME: 'my-custom-image:1.0.0'
----== Substitute envs in files using patterns for input files
[source,yaml]
----
- uses: actions/checkout@v4
with:
fetch-depth: 0- name: envsubst-gnu-utility
uses: actions-able/envsubst-action@v1
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`.
== Parameters
[cols="2a,6a,1a",options="header"]
|===
|Name
|Description
|Default value|working-directory
|Directory where to find the input file(s)
|`.`|input-file
|Path to the input file. Needs `output-file` to be set if defined.WARNING: The parameter `input-file-pattern` can't be used at the time.
||output-file
|Path to the output file. Needs `input-file` to be set if defined.
||input-file-pattern
|Pattern of input files. Will be used with GNU `find -name`.WARNING: The parameter `input-file` can't be used at the time.
||output-file-suffix
|Suffix that will be added to filenames for output files when using `input-file-pattern`.
|`.subst`|===