testvariable #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: testvariable | |
# Controls when the workflow will run | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test-variable: | |
runs-on: windows-latest | |
steps: | |
# Step 1: Set a variable by writing to $GITHUB_ENV | |
- name: Set variable in $GITHUB_ENV | |
shell: bash | |
run: echo "test=test123" >> $GITHUB_ENV | |
# Step 2: Access the variable in a subsequent step | |
- name: Check variable | |
shell: bash | |
run: echo "The value of test is $test" | |
- name: Check variable in PowerShell | |
shell: pwsh | |
run: echo "The value of test is $env:test" |