-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
49 lines (46 loc) · 1.49 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 'substitute-action'
description: 'GitHub Action to substitute environment variables'
author: 'Azeem Sajid <azeem.sajid@gmail.com>'
branding:
icon: 'code'
color: 'green'
inputs:
env-files:
description: 'List of `.env` files containing `VARIABLE=VALUE` per line'
required: false
input-files:
description: 'List of input files to substitute environment variables'
required: true
variables:
description: 'List of variables to substitute; the rest is ignored'
required: false
prefixes:
description: 'List of prefixes to select env vars in addition to `variables`'
required: false
output-directory:
description: 'Output directory path when `enable-in-place: false`'
required: false
enable-in-place:
description: 'Enable/disable in-place substitution'
required: false
default: 'true'
enable-dump:
description: 'Enable/disable dumping of updated/generated files'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: 'Substitute'
env:
ENV_FILES: '${{ inputs.env-files }}'
INPUT_FILES: '${{ inputs.input-files }}'
VARIABLES: '${{ inputs.variables }}'
PREFIXES: '${{ inputs.prefixes }}'
OUTPUT_DIRECTORY: '${{ inputs.output-directory }}'
ENABLE_IN_PLACE: ${{ inputs.enable-in-place == 'true' }}
ENABLE_DUMP: ${{ inputs.enable-dump == 'true' }}
shell: bash
run: |
$GITHUB_ACTION_PATH/scripts/validate.bash
$GITHUB_ACTION_PATH/scripts/substitute.bash