Which of the following commands will set the $FOO environment variable within a script, so that it may be used in subsequent workflow job steps?
Which of the following commands will set the $FOO environment variable within a script, so that it may be used in subsequent workflow job steps?
A . run: echo "::set-env name=FOO::bar"
B . run: echo "FOO=bar" >> $GITHUB_ENV
C . run: echo ${{ $FOO=bar }}
D . run: export FOO=bar
Answer: B
Explanation:
The $GITHUB_ENV environment variable is used to set environment variables that persist across steps in a workflow job. By echoing FOO=bar into $GITHUB_ENV, the variable FOO will be available in subsequent steps within the same job.
Latest GitHub Actions Dumps Valid Version with 72 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments