-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
62 lines (56 loc) · 2.06 KB
/
action.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
# action.yaml
name: 'Labrador Action'
description: 'Fetch and load values as environment variables'
inputs:
aws-region:
description: 'Explicit AWS region, if different from configured environment variables.'
required: false
aws-sm-secret:
description: 'One or more AWS Secrets Manager secrets to fetch values from.'
required: false
aws-ssm-parameter:
description: 'One or more AWS SSM Parameter Store paths to fetch values from. Each can be individual or wildcard.'
required: false
config:
description: 'Specify an alternative Labrador config file in the repo.'
required: false
install-only:
description: 'Only install the Labrador binary in the workflow. Do not fetch any values.'
required: false
default: 'false'
set-env:
description: 'Set the fetched values as workflow environment variables.'
required: false
default: 'true'
branding:
color: yellow
icon: download-cloud
runs:
using: 'composite'
steps:
# This is required to find the .labrador.yaml config file.
- name: Checkout repository code
uses: actions/checkout@v3
# This is required for the action to find the shell scripts.
- name: "Add this action's path to executable path"
shell: bash
run: |
echo "${{ github.action_path }}" >> $GITHUB_PATH
echo "${{ github.action_path }}/scripts" >> $GITHUB_PATH
- name: Download Labrador
shell: bash
# https://github.com/actions/runner/issues/2473
# https://github.com/actions/runner/issues/2525
env:
GHACTION_LABRADOR_DOCKER_REF: ${{ github.action_ref }}
run: download-labrador.sh
- name: Run Labrador
if: ${{ inputs.install-only == 'false' }}
shell: bash
env:
GHACTION_LABRADOR_CONFIG_FILE: ${{ inputs.config }}
GHACTION_LABRADOR_SET_ENV: ${{ inputs.set-env }}
GHACTION_LABRADOR_AWS_REGION: ${{ inputs.aws-region }}
GHACTION_LABRADOR_AWS_SSM_PARAM: ${{ inputs.aws-ssm-parameter }}
GHACTION_LABRADOR_AWS_SM_SECRET: ${{ inputs.aws-sm-secret }}
run: run-labrador.sh