We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0634466 commit c2989b8Copy full SHA for c2989b8
1 file changed
.github/workflows/env-variable-test.yaml
@@ -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
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