-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.yaml
36 lines (32 loc) · 1.08 KB
/
example.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
name: YAML to Env Example Workflow
on:
workflow_dispatch:
inputs:
yaml-file:
type: string
required: false
description: "Path to YAML file to parse"
default: "test-values.yaml"
yq-version:
type: string
required: false
description: "Version of yq to install, if not already"
mask-values:
type: string
required: false
default: "false"
description: "Add value masking to all exported environment variable values (https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#example-masking-an-environment-variable)"
jobs:
yaml-to-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set ENV values from YAML
uses: dcarbone/yaml-to-env-action@v3
with:
yaml-file: '${{ inputs.yaml-file }}'
yq-version: '${{ inputs.yq-version }}'
mask-values: '${{ inputs.mask-values }}'
- name: Print environment variables
run: |
printenv