forked from ExamProCo/Github-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.44 KB
/
contexts.yml
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
45
46
47
48
49
50
51
52
name: Visualising Contexts Workflow
on:
workflow_dispatch:
env:
TEST_ENV_W: "just a test in workflow"
jobs:
show-contexts:
runs-on: ubuntu-latest
env:
TEST_ENV_J: "just a test in job"
steps:
- id: showing-workflow-context
name: Showing Workflow Context
env:
GITHUB_CONTEXT_JSON: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT_JSON"
echo "Run Attempts via context: ${{ github.run_attempt }}"
echo "Run Attempts via env: $RUN_ATTEMPT"
- id: showing-job-context
name: Showing Job Context
env:
JOB_CONTEXT_JSON: ${{ toJson(job) }}
run: |
echo "$JOB_CONTEXT_JSON"
echo "Run Attempts via context: ${{ job.services }}"
echo "Run Attempts via env: $SERVICES"
# - id: showing-steps-context
# name: Showing Steps Context
# run: |
# echo ${{ steps }}
# - id: showing-runner-context
# name: Showing Runner Context
# run: |
# echo ${{ runner }}
# - id: showing-env-context
# name: Showing Env Context
# run: |
# echo ${{ env }}
# - id: showing-vars-context
# name: Showing Vars Context
# run: |
# echo ${{ vars }}
# - id: showing-secrets-context
# name: Showing Secrets Context
# run: |
# echo ${{ secrets }}