Replace environment variables in files
tencentcom/envsubst:latest
docker run --rm -v $(pwd):$(pwd) -w $(pwd) \ -e PLUGIN_FILE=example.txt \ tencentcom/envsubst:latest
main:
push:
- stages:
- name: Replace environment variables in files, only support variables starting with CNB_
image: tencentcom/envsubst:latest
settings:
# File to be processed
file: example.txt
main:
push:
- stages:
- name: Replace environment variables in files, support custom environment variables
image: tencentcom/envsubst:latest
env:
ENV_A: value
script:
- envsubst < input.txt > output.txt