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: Workflow Commands | |
on: | |
push: | |
jobs: | |
commands_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set environment variable with "key" as "foo" and "value" as "bar" | |
run: echo "foo=bar" >> $GITHUB_ENV | |
- name: Echo the environment variable "foo" from previous step | |
run: echo "Hello, $foo" | |
- name: Mask the "api_key" within this steps's environment variable and echo it | |
env: | |
api_key: 1aO764b_4e59_p@$Sw0RdAStvdf-19ofvs4F | |
run: | | |
echo "Un-Masked key = $api_key" | |
echo "::add-mask::$api_key" | |
echo "Masked key = $api_key" | |
- name: Create a warning Log for this message "This is a warning message." | |
run: echo "::warning::This is a warning message." | |
- name: Create an error annotation with following parameters, file=app.py line=49 message=nullValue | |
run: echo "::error file=app.py,line=49::nullValue" | |
- name: Set an output with "key" as LUCKY_NUMBER and "value" as 1234567 | |
id: lucky_number_step | |
run: echo "LUCKY_NUMBER=1234567" >> "$GITHUB_OUTPUT" | |
- name: Echo the output set in the previous step | |
run: echo "My lucky number is ${{ steps.lucky_number_step.outputs.LUCKY_NUMBER }}" | |
- name: Create a Job Summary as "Exploring Workflow Commands :thumbsup:" | |
run: echo "Exploring Workflow Commands :thumbsup:" >> $GITHUB_STEP_SUMMARY | |