Skip to content

Commit a0408e3

Browse files
committed
testing github actions
1 parent 713b722 commit a0408e3

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Testing Github Actions Workflow
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
test:
7+
name: Testing Github Actions Job
8+
env:
9+
CHOSEN_ENVIRONMENT: env1
10+
FOO: ${{ secrets.FOO }}
11+
BAR: ${{ secrets.BAR }}
12+
environment: ${{ env.CHOSEN_ENVIRONMENT }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Check env vars
18+
run: |
19+
echo "env.FOO == ${{ env.FOO }}"
20+
echo "env.BAR == ${{ env.BAR }}"
21+
echo "env.CHOSEN_ENVIRONMENT == ${{ env.CHOSEN_ENVIRONMENT }}"
22+
23+
- name: This should run
24+
if: ${{ env.FOO == 'foo1' }}
25+
run: echo "env.FOO == 'foo1' -> ${{ env.FOO }} -> ${{ env.FOO == 'foo1' }} -> you will see this"
26+
27+
- name: This should not run
28+
if: ${{ env.FOO == 'foo2' }}
29+
run: echo "env.FOO == 'foo2' -> ${{ env.FOO }} -> ${{ env.FOO == 'foo2' }} -> you will not see this"
30+

0 commit comments

Comments
 (0)