-
Notifications
You must be signed in to change notification settings - Fork 76
44 lines (41 loc) · 1.21 KB
/
06-contexts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }}"