Skip to content

06 - Contexts | DEBUG - #15

06 - Contexts | DEBUG -

06 - Contexts | DEBUG - #15

Workflow file for this run

# See 06-contexts/README.md for more information
# about the how to use contexts in GitHub Actions.
name: 06 - Contexts
run-name: 06 - Contexts | DEBUG - ${{ inputs.debug }}
on:
push:
workflow_dispatch:
inputs:
debug:
type: boolean
default: false
env:
MY_WORKFLOW_VAR: 'workflow'
MY_OVERWRITTEN_VAR: 'workflow'
jobs:
echo-data:
runs-on: ubuntu-latest
env:
MY_JOB_VAR: 'job'
MY_OVERWRITTEN_VAR: 'job'
steps:
- name: Display information
run: |
echo "Event Name: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "SHA: ${{ github.sha }}"
echo "Actor: ${{ github.actor }}"
echo "Workflow: ${{ github.workflow }}"
echo "Run ID: ${{ github.run_id }}"
echo "Run number: ${{ github.run_number }}"
- name: Retrieve Variable
run: |
echo "Variable value: ${{ vars.MY_VAR }}"
- name: Print Env Variables
env:
MY_OVERWRITTEN_VAR: 'step'
run: |
echo "Workflow env: ${{ env.MY_WORKFLOW_VAR }}"
echo "Overwritten env: ${{ env.MY_OVERWRITTEN_VAR }}"
- name: Print Env Variables
run: |
echo "Workflow env: ${{ env.MY_WORKFLOW_VAR }}"
echo "Overwritten env: ${{ env.MY_OVERWRITTEN_VAR }}"
echo-data2:
runs-on: ubuntu-latest
steps:
- name: Print Env Variables
run: |
echo "Workflow env: $MY_WORKFLOW_VAR"
echo "Overwritten env: $MY_OVERWRITTEN_VAR"