Visualising Contexts Workflow #11
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: 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 Services via context: ${{ job.services }}" | |
- id: showing-steps-context | |
name: Showing Steps Context | |
env: | |
STEPS_CONTEXT_JSON: ${{ toJson(steps) }} | |
run: | | |
echo "$STEPS_CONTEXT_JSON" | |
- id: showing-runner-context | |
name: Showing Runner Context | |
env: | |
RUNNER_CONTEXT_JSON: ${{ toJson(runner) }} | |
run: | | |
echo "$RUNNER_CONTEXT_JSON" | |
- id: showing-env-context | |
name: Showing Env Context | |
env: | |
ENV_XXX: "xxx" | |
ENV_CONTEXT_JSON: ${{ toJson(env) }} | |
run: | | |
echo "$ENV_CONTEXT_JSON" | |
echo "$TEST_ENV_W" | |
- id: showing-vars-context | |
name: Showing Vars Context | |
env: | |
VARS_CONTEXT_JSON: ${{ toJson(vars) }} | |
run: | | |
echo "$VARS_CONTEXT_JSON" | |
- id: showing-secrets-context | |
name: Showing Secrets Context | |
env: | |
SECRETS_CONTEXT_JSON: ${{ toJson(secrets) }} | |
run: | | |
echo "$SECRETS_CONTEXT_JSON" |