Test env context #14
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
name: Test env context | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
type: string | |
default: main | |
description: "The branch, tag, or SHA to checkout" | |
bool1: | |
type: boolean | |
description: "test flag #1" | |
default: true | |
bool2: | |
type: boolean | |
description: "test flag #2" | |
default: false | |
jobs: | |
run: | |
name: Test env context | |
runs-on: ubuntu-latest | |
steps: | |
- name: test env context | |
env: | |
test1: ${{ inputs.bool1 || '' }} | |
test2: ${{ inputs.bool2 || '' }} | |
run: | | |
export test3=yay3 | |
echo "env.test1: ${{ env.test1 || 'boo1' }}" | |
echo "env.test2: ${{ env.test2 || 'boo2' }}" | |
echo "env.test3: ${{ env.test3 || 'boo3' }}" |