To prepare any environment variables and any files.
name: Sample
on: push
steps:
- uses: actions/checkout@v2
- uses: satoruk/action-prepare@v2.0.2
with:
config_file: examples/demo.yml
env:
# To be a masked environment variable
DUMMY1_TOKEN: DUMMY1_TOKEN_VALUE
# To be a environment variable(no mask)
DUMMY1_NO_SECRET_TOKEN:
value: DUMMY1_NO_SECRET_TOKEN_VALUE
secret: false
DUMMY1_HOME:
# To use any environment variables at value
value: ${HOME}
secret: false
file:
examples/dest/dummy1.json: |
{
"dummy": "dummy1_1"
}
# To use any environment variables and absolute path
${HOME}/dest/dummy1_${GITHUB_SHA}.json: |
{
"dummy": "dummy1_2"
}
mask:
- MASK_VALUE1
# To use any environment variables
- ${GITHUB_REPOSITORY}
If you want to use encrypted config file, encrypt to your config file on your git repository.
To encrypt sample command below.
gpg \
--batch \
--cipher-algo AES256 \
--compress-algo zlib \
--passphrase 'secret stuff' \
--symmetric \
--yes \
"/path/to/config.yml"
name: Sample
on: push
steps:
- uses: actions/checkout@v2
- uses: satoruk/action-prepare@v2.0.2
with:
config_file: examples/demo.yml.gpg
gpg_passphrase: ${{ secrets.YOUR_PASSPHRASE }}