-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (37 loc) · 1.52 KB
/
test-env-vars.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
name: Test Env Vars
on:
workflow_dispatch:
inputs:
server:
description: 'Server to deploy to (staging|test|prod)'
required: true
default: 'staging'
jobs:
build:
runs-on: ubuntu-latest
env:
TEST_VALUE: initial
VAL_FROM_SECRET: initial
steps:
- shell: pwsh
run: |
echo "TEST_VALUE=$test" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "VAL_FROM_SECRET=${{ secrets.SECRET_VALUE }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "Running on test (${{ github.event.inputs.server }}) environment"
- shell: pwsh
run: |
echo "TEST_VALUE='${{ env.TEST_VALUE }}' and VAL_FROM_SECRET='${{ env.VAL_FROM_SECRET }}'"
- shell: pwsh
run: |
echo 'TEST_VALUE=$test' | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo 'VAL_FROM_SECRET=${{ secrets.SECRET_VALUE }}' | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- shell: pwsh
run: |
echo "TEST_VALUE='${{ env.TEST_VALUE }}' and VAL_FROM_SECRET='${{ env.VAL_FROM_SECRET }}'"
- shell: pwsh
run: |
echo "TEST_VALUE='$test'" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "VAL_FROM_SECRET='${{ secrets.SECRET_VALUE }}'" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- shell: pwsh
run: |
echo "TEST_VALUE='${{ env.TEST_VALUE }}' and VAL_FROM_SECRET='${{ env.VAL_FROM_SECRET }}'"