Skip to content

Commit c2989b8

Browse files
authored
Create env-variable-test.yaml
1 parent 0634466 commit c2989b8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ENV variable test
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag-name:
6+
required: true
7+
release:
8+
types: [released, prereleased]
9+
10+
11+
jobs:
12+
set-env:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Set Tag name
16+
if: github.event_name == 'release'
17+
run: echo "TAG_NAME=${{ github.event.release.name }}" >> $GITHUB_ENV
18+
19+
- name: Set Tag name
20+
if: github.event_name == 'workflow_dispatch'
21+
run: echo "TAG_NAME=${{ github.event.inputs.tag-name }}" >> $GITHUB_ENV
22+
23+
- name: Print TAG_NAME
24+
run: echo $TAG_NAME

0 commit comments

Comments
 (0)