From 763f8866bb35f1775e051827c5dbc77b949e2963 Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 17 Oct 2024 20:04:57 +0900 Subject: [PATCH] update test data for context availability code generation Co-authored-by: Yukai Chou --- scripts/generate-availability/testdata/ok.go | 36 +-- scripts/generate-availability/testdata/ok.md | 225 ++++++------------- 2 files changed, 88 insertions(+), 173 deletions(-) diff --git a/scripts/generate-availability/testdata/ok.go b/scripts/generate-availability/testdata/ok.go index 124444b48..a160891da 100644 --- a/scripts/generate-availability/testdata/ok.go +++ b/scripts/generate-availability/testdata/ok.go @@ -12,33 +12,33 @@ package actionlint func WorkflowKeyAvailability(key string) ([]string, []string) { switch key { case "jobs..outputs.": - return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "steps", "strategy"}, []string{} + return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "steps", "strategy", "vars"}, []string{} case "jobs..steps.continue-on-error", "jobs..steps.env", "jobs..steps.name", "jobs..steps.run", "jobs..steps.timeout-minutes", "jobs..steps.with", "jobs..steps.working-directory": - return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "steps", "strategy"}, []string{"hashfiles"} + return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "steps", "strategy", "vars"}, []string{"hashfiles"} case "jobs..container.env.", "jobs..services..env.": - return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "strategy"}, []string{} + return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "strategy", "vars"}, []string{} case "jobs..environment.url": - return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "steps", "strategy"}, []string{} + return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "steps", "strategy", "vars"}, []string{} case "jobs..steps.if": - return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "steps", "strategy"}, []string{"always", "cancelled", "failure", "hashfiles", "success"} - case "jobs..container", "jobs..container.credentials", "jobs..services..credentials": - return []string{"env", "github", "inputs", "matrix", "needs", "secrets", "strategy"}, []string{} + return []string{"env", "github", "inputs", "job", "matrix", "needs", "runner", "steps", "strategy", "vars"}, []string{"always", "cancelled", "failure", "hashfiles", "success"} + case "jobs..container.credentials", "jobs..services..credentials": + return []string{"env", "github", "inputs", "matrix", "needs", "secrets", "strategy", "vars"}, []string{} case "jobs..defaults.run": - return []string{"env", "github", "inputs", "matrix", "needs", "strategy"}, []string{} - case "concurrency", "on.workflow_call.inputs..default": - return []string{"github", "inputs"}, []string{} + return []string{"env", "github", "inputs", "matrix", "needs", "strategy", "vars"}, []string{} case "on.workflow_call.outputs..value": - return []string{"github", "inputs", "jobs"}, []string{} + return []string{"github", "inputs", "jobs", "vars"}, []string{} case "jobs..env", "jobs..secrets.": - return []string{"github", "inputs", "matrix", "needs", "secrets", "strategy"}, []string{} - case "jobs..concurrency", "jobs..continue-on-error", "jobs..environment", "jobs..name", "jobs..runs-on", "jobs..services", "jobs..timeout-minutes", "jobs..with.": - return []string{"github", "inputs", "matrix", "needs", "strategy"}, []string{} + return []string{"github", "inputs", "matrix", "needs", "secrets", "strategy", "vars"}, []string{} + case "jobs..concurrency", "jobs..container", "jobs..container.image", "jobs..continue-on-error", "jobs..environment", "jobs..name", "jobs..runs-on", "jobs..services", "jobs..timeout-minutes", "jobs..with.": + return []string{"github", "inputs", "matrix", "needs", "strategy", "vars"}, []string{} case "jobs..strategy": - return []string{"github", "inputs", "needs"}, []string{} + return []string{"github", "inputs", "needs", "vars"}, []string{} case "jobs..if": - return []string{"github", "inputs", "needs"}, []string{"always", "cancelled", "failure", "success"} + return []string{"github", "inputs", "needs", "vars"}, []string{"always", "cancelled", "failure", "success"} case "env": - return []string{"github", "inputs", "secrets"}, []string{} + return []string{"github", "inputs", "secrets", "vars"}, []string{} + case "concurrency", "on.workflow_call.inputs..default", "run-name": + return []string{"github", "inputs", "vars"}, []string{} default: return nil, nil } @@ -53,4 +53,4 @@ func WorkflowKeyAvailability(key string) ([]string, []string) { var SpecialFunctionNames = map[string][]string{"always": []string{"jobs..if", "jobs..steps.if"}, "cancelled": []string{"jobs..if", "jobs..steps.if"}, "failure": []string{"jobs..if", "jobs..steps.if"}, "hashfiles": []string{"jobs..steps.continue-on-error", "jobs..steps.env", "jobs..steps.if", "jobs..steps.name", "jobs..steps.run", "jobs..steps.timeout-minutes", "jobs..steps.with", "jobs..steps.working-directory"}, "success": []string{"jobs..if", "jobs..steps.if"}} // For test -var allWorkflowKeys = []string{"concurrency", "env", "jobs..concurrency", "jobs..container", "jobs..container.credentials", "jobs..container.env.", "jobs..continue-on-error", "jobs..defaults.run", "jobs..env", "jobs..environment", "jobs..environment.url", "jobs..if", "jobs..name", "jobs..outputs.", "jobs..runs-on", "jobs..secrets.", "jobs..services", "jobs..services..credentials", "jobs..services..env.", "jobs..steps.continue-on-error", "jobs..steps.env", "jobs..steps.if", "jobs..steps.name", "jobs..steps.run", "jobs..steps.timeout-minutes", "jobs..steps.with", "jobs..steps.working-directory", "jobs..strategy", "jobs..timeout-minutes", "jobs..with.", "on.workflow_call.inputs..default", "on.workflow_call.outputs..value"} +var allWorkflowKeys = []string{"concurrency", "env", "jobs..concurrency", "jobs..container", "jobs..container.credentials", "jobs..container.env.", "jobs..container.image", "jobs..continue-on-error", "jobs..defaults.run", "jobs..env", "jobs..environment", "jobs..environment.url", "jobs..if", "jobs..name", "jobs..outputs.", "jobs..runs-on", "jobs..secrets.", "jobs..services", "jobs..services..credentials", "jobs..services..env.", "jobs..steps.continue-on-error", "jobs..steps.env", "jobs..steps.if", "jobs..steps.name", "jobs..steps.run", "jobs..steps.timeout-minutes", "jobs..steps.with", "jobs..steps.working-directory", "jobs..strategy", "jobs..timeout-minutes", "jobs..with.", "on.workflow_call.inputs..default", "on.workflow_call.outputs..value", "run-name"} diff --git a/scripts/generate-availability/testdata/ok.md b/scripts/generate-availability/testdata/ok.md index 03675a94b..3e9584f28 100644 --- a/scripts/generate-availability/testdata/ok.md +++ b/scripts/generate-availability/testdata/ok.md @@ -1,5 +1,5 @@ --- -title: Contexts +title: Accessing contextual information about workflow runs shortTitle: Contexts intro: You can access context information in workflows and actions. redirect_from: @@ -8,24 +8,23 @@ redirect_from: - /actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions - /actions/reference/contexts-and-expression-syntax-for-github-actions - /actions/reference/context-and-expression-syntax-for-github-actions + - /actions/learn-github-actions/contexts + - /actions/writing-workflows/choosing-what-your-workflow-does/contexts versions: fpt: '*' ghes: '*' - ghae: '*' ghec: '*' -miniTocMaxHeadingLevel: 3 --- -{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} ## About contexts -Contexts are a way to access information about workflow runs, runner environments, jobs, and steps. Each context is an object that contains properties, which can be strings or other objects. +{% data reusables.actions.actions-contexts-about-description %} Each context is an object that contains properties, which can be strings or other objects. -{% data reusables.actions.context-contents %} For example, the `matrix` context is only populated for jobs in a [matrix](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix). +{% data reusables.actions.context-contents %} For example, the `matrix` context is only populated for jobs in a [matrix](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix). -You can access contexts using the expression syntax. For more information, see "[Expressions](/actions/learn-github-actions/expressions)." +You can access contexts using the expression syntax. For more information, see "[AUTOTITLE](/actions/learn-github-actions/expressions)." {% raw %} `${{ }}` @@ -36,110 +35,54 @@ You can access contexts using the expression syntax. For more information, see " | Context name | Type | Description | |---------------|------|-------------| | `github` | `object` | Information about the workflow run. For more information, see [`github` context](#github-context). | -| `env` | `object` | Contains environment variables set in a workflow, job, or step. For more information, see [`env` context](#env-context). | +| `env` | `object` | Contains variables set in a workflow, job, or step. For more information, see [`env` context](#env-context). | +| `vars` | `object` | Contains variables set at the repository, organization, or environment levels. For more information, see [`vars` context](#vars-context). | | `job` | `object` | Information about the currently running job. For more information, see [`job` context](#job-context). | -{%- ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} -| `jobs` | `object` | For reusable workflows only, contains outputs of jobs from the reusable workflow. For more information, see [`jobs` context](#jobs-context). |{% endif %} +| `jobs` | `object` | For reusable workflows only, contains outputs of jobs from the reusable workflow. For more information, see [`jobs` context](#jobs-context). | | `steps` | `object` | Information about the steps that have been run in the current job. For more information, see [`steps` context](#steps-context). | | `runner` | `object` | Information about the runner that is running the current job. For more information, see [`runner` context](#runner-context). | | `secrets` | `object` | Contains the names and values of secrets that are available to a workflow run. For more information, see [`secrets` context](#secrets-context). | | `strategy` | `object` | Information about the matrix execution strategy for the current job. For more information, see [`strategy` context](#strategy-context). | | `matrix` | `object` | Contains the matrix properties defined in the workflow that apply to the current job. For more information, see [`matrix` context](#matrix-context). | | `needs` | `object` | Contains the outputs of all jobs that are defined as a dependency of the current job. For more information, see [`needs` context](#needs-context). | -{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %} -| `inputs` | `object` | Contains the inputs of a reusable {% ifversion actions-unified-inputs %}or manually triggered {% endif %}workflow. For more information, see [`inputs` context](#inputs-context). |{% endif %} +| `inputs` | `object` | Contains the inputs of a reusable or manually triggered workflow. For more information, see [`inputs` context](#inputs-context). | As part of an expression, you can access context information using one of two syntaxes. -- Index syntax: `github['sha']` -- Property dereference syntax: `github.sha` +* Index syntax: `github['sha']` +* Property dereference syntax: `github.sha` In order to use property dereference syntax, the property name must start with a letter or `_` and contain only alphanumeric characters, `-`, or `_`. -If you attempt to dereference a non-existent property, it will evaluate to an empty string. +If you attempt to dereference a nonexistent property, it will evaluate to an empty string. ### Determining when to use contexts -{% data reusables.actions.using-context-or-environment-variables %} +{% data variables.product.prodname_actions %} includes a collection of variables called _contexts_ and a similar collection of variables called _default variables_. These variables are intended for use at different points in the workflow: -### Context availability +* **Default environment variables:** These environment variables exist only on the runner that is executing your job. For more information, see "[AUTOTITLE](/actions/learn-github-actions/variables#default-environment-variables)." +* **Contexts:** You can use most contexts at any point in your workflow, including when _default variables_ would be unavailable. For example, you can use contexts with expressions to perform initial processing before the job is routed to a runner for execution; this allows you to use a context with the conditional `if` keyword to determine whether a step should run. Once the job is running, you can also retrieve context variables from the runner that is executing the job, such as `runner.os`. For details of where you can use various contexts within a workflow, see "[Context availability](#context-availability)." -Different contexts are available throughout a workflow run. For example, the `secrets` context may only be used at certain places within a job. +The following example demonstrates how these different types of variables can be used together in a job: -In addition, some functions may only be used in certain places. For example, the `hashFiles` function is not available everywhere. +{% raw %} -The following table indicates where each context and special function can be used within a workflow. Unless listed below, a function can be used anywhere. +```yaml copy +name: CI +on: push +jobs: + prod-check: + if: ${{ github.ref == 'refs/heads/main' }} + runs-on: ubuntu-latest + steps: + - run: echo "Deploying to production server on branch $GITHUB_REF" +``` -{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} +{% endraw %} -| Workflow key | Context | Special functions | -| ---- | ------- | ----------------- | -| concurrency | github, inputs | None | -| env | github, secrets, inputs | None | -| jobs.<job_id>.concurrency | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.container | github, needs, strategy, matrix, env, secrets, inputs | None | -| jobs.<job_id>.container.credentials | github, needs, strategy, matrix, env, secrets, inputs | None | -| jobs.<job_id>.container.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets, inputs | None | -| jobs.<job_id>.continue-on-error | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.defaults.run | github, needs, strategy, matrix, env, inputs | None | -| jobs.<job_id>.env | github, needs, strategy, matrix, secrets, inputs | None | -| jobs.<job_id>.environment | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.environment.url | github, needs, strategy, matrix, job, runner, env, steps, inputs | None | -| jobs.<job_id>.if | github, needs, inputs | always, cancelled, success, failure | -| jobs.<job_id>.name | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.outputs.<output_id> | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | None | -| jobs.<job_id>.runs-on | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.secrets.<secrets_id> | github, needs,{% ifversion actions-reusable-workflow-matrix %} strategy, matrix,{% endif %} secrets{% ifversion actions-unified-inputs %}, inputs{% endif %} | None | -| jobs.<job_id>.services | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.services.<service_id>.credentials | github, needs, strategy, matrix, env, secrets, inputs | None | -| jobs.<job_id>.services.<service_id>.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets, inputs | None | -| jobs.<job_id>.steps.continue-on-error | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.env | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.if | github, needs, strategy, matrix, job, runner, env, steps, inputs | always, cancelled, success, failure, hashFiles | -| jobs.<job_id>.steps.name | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.run | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.timeout-minutes | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.with | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.working-directory | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.strategy | github, needs, inputs | None | -| jobs.<job_id>.timeout-minutes | github, needs, strategy, matrix, inputs | None | -| jobs.<job_id>.with.<with_id> | github, needs{% ifversion actions-reusable-workflow-matrix %}, strategy, matrix{% endif %}{% ifversion actions-unified-inputs %}, inputs{% endif %} | None | -| on.workflow_call.inputs.<inputs_id>.default | github{% ifversion actions-unified-inputs %}, inputs{% endif %} | None | -| on.workflow_call.outputs.<output_id>.value | github, jobs, inputs | None | -{% else %} -| Path | Context | Special functions | -| ---- | ------- | ----------------- | -| concurrency | github | None | -| env | github, secrets | None | -| jobs.<job_id>.concurrency | github, needs, strategy, matrix | None | -| jobs.<job_id>.container | github, needs, strategy, matrix | None | -| jobs.<job_id>.container.credentials | github, needs, strategy, matrix, env, secrets | None | -| jobs.<job_id>.container.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets | None | -| jobs.<job_id>.continue-on-error | github, needs, strategy, matrix | None | -| jobs.<job_id>.defaults.run | github, needs, strategy, matrix, env | None | -| jobs.<job_id>.env | github, needs, strategy, matrix, secrets | None | -| jobs.<job_id>.environment | github, needs, strategy, matrix | None | -| jobs.<job_id>.environment.url | github, needs, strategy, matrix, job, runner, env, steps | None | -| jobs.<job_id>.if | github, needs | always, cancelled, success, failure | -| jobs.<job_id>.name | github, needs, strategy, matrix | None | -| jobs.<job_id>.outputs.<output_id> | github, needs, strategy, matrix, job, runner, env, secrets, steps | None | -| jobs.<job_id>.runs-on | github, needs, strategy, matrix | None | -| jobs.<job_id>.services | github, needs, strategy, matrix | None | -| jobs.<job_id>.services.<service_id>.credentials | github, needs, strategy, matrix, env, secrets | None | -| jobs.<job_id>.services.<service_id>.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets | None | -| jobs.<job_id>.steps.continue-on-error | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.env | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.if | github, needs, strategy, matrix, job, runner, env, steps | always, cancelled, success, failure, hashFiles | -| jobs.<job_id>.steps.name | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.run | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.timeout-minutes | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.with | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.working-directory | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.strategy | github, needs | None | -| jobs.<job_id>.timeout-minutes | github, needs, strategy, matrix | None | -{% endif %} - -### Context availability 2 +In this example, the `if` statement checks the [`github.ref`](/actions/learn-github-actions/contexts#github-context) context to determine the current branch name; if the name is `refs/heads/main`, then the subsequent steps are executed. The `if` check is processed by {% data variables.product.prodname_actions %}, and the job is only sent to the runner if the result is `true`. Once the job is sent to the runner, the step is executed and refers to the [`$GITHUB_REF`](/actions/learn-github-actions/variables#default-environment-variables) variable from the runner. + +### Context availability Different contexts are available throughout a workflow run. For example, the `secrets` context may only be used at certain places within a job. @@ -147,71 +90,43 @@ In addition, some functions may only be used in certain places. For example, the The following table indicates where each context and special function can be used within a workflow. Unless listed below, a function can be used anywhere. -{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} - | Workflow key | Context | Special functions | | ---- | ------- | ----------------- | -| concurrency | github, inputs | | -| env | github, secrets, inputs | | -| jobs.<job_id>.concurrency | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.container | github, needs, strategy, matrix, env, secrets, inputs | | -| jobs.<job_id>.container.credentials | github, needs, strategy, matrix, env, secrets, inputs | | -| jobs.<job_id>.container.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets, inputs | | -| jobs.<job_id>.continue-on-error | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.defaults.run | github, needs, strategy, matrix, env, inputs | | -| jobs.<job_id>.env | github, needs, strategy, matrix, secrets, inputs | | -| jobs.<job_id>.environment | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.environment.url | github, needs, strategy, matrix, job, runner, env, steps, inputs | | -| jobs.<job_id>.if | github, needs, inputs | always, cancelled, success, failure | -| jobs.<job_id>.name | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.outputs.<output_id> | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | | -| jobs.<job_id>.runs-on | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.secrets.<secrets_id> | github, needs,{% ifversion actions-reusable-workflow-matrix %} strategy, matrix,{% endif %} secrets{% ifversion actions-unified-inputs %}, inputs{% endif %} | | -| jobs.<job_id>.services | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.services.<service_id>.credentials | github, needs, strategy, matrix, env, secrets, inputs | | -| jobs.<job_id>.services.<service_id>.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets, inputs | | -| jobs.<job_id>.steps.continue-on-error | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.env | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.if | github, needs, strategy, matrix, job, runner, env, steps, inputs | always, cancelled, success, failure, hashFiles | -| jobs.<job_id>.steps.name | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.run | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.timeout-minutes | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.with | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.steps.working-directory | github, needs, strategy, matrix, job, runner, env, secrets, steps, inputs | hashFiles | -| jobs.<job_id>.strategy | github, needs, inputs | | -| jobs.<job_id>.timeout-minutes | github, needs, strategy, matrix, inputs | | -| jobs.<job_id>.with.<with_id> | github, needs{% ifversion actions-reusable-workflow-matrix %}, strategy, matrix{% endif %}{% ifversion actions-unified-inputs %}, inputs{% endif %} | | -| on.workflow_call.inputs.<inputs_id>.default | github{% ifversion actions-unified-inputs %}, inputs{% endif %} | | -| on.workflow_call.outputs.<output_id>.value | github, jobs, inputs | | -{% else %} -| Path | Context | Special functions | -| ---- | ------- | ----------------- | -| concurrency | github | | -| env | github, secrets | | -| jobs.<job_id>.concurrency | github, needs, strategy, matrix | | -| jobs.<job_id>.container | github, needs, strategy, matrix | | -| jobs.<job_id>.container.credentials | github, needs, strategy, matrix, env, secrets | | -| jobs.<job_id>.container.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets | | -| jobs.<job_id>.continue-on-error | github, needs, strategy, matrix | | -| jobs.<job_id>.defaults.run | github, needs, strategy, matrix, env | | -| jobs.<job_id>.env | github, needs, strategy, matrix, secrets | | -| jobs.<job_id>.environment | github, needs, strategy, matrix | | -| jobs.<job_id>.environment.url | github, needs, strategy, matrix, job, runner, env, steps | | -| jobs.<job_id>.if | github, needs | always, cancelled, success, failure | -| jobs.<job_id>.name | github, needs, strategy, matrix | | -| jobs.<job_id>.outputs.<output_id> | github, needs, strategy, matrix, job, runner, env, secrets, steps | | -| jobs.<job_id>.runs-on | github, needs, strategy, matrix | | -| jobs.<job_id>.services | github, needs, strategy, matrix | | -| jobs.<job_id>.services.<service_id>.credentials | github, needs, strategy, matrix, env, secrets | | -| jobs.<job_id>.services.<service_id>.env.<env_id> | github, needs, strategy, matrix, job, runner, env, secrets | | -| jobs.<job_id>.steps.continue-on-error | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.env | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.if | github, needs, strategy, matrix, job, runner, env, steps | always, cancelled, success, failure, hashFiles | -| jobs.<job_id>.steps.name | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.run | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.timeout-minutes | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.with | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.steps.working-directory | github, needs, strategy, matrix, job, runner, env, secrets, steps | hashFiles | -| jobs.<job_id>.strategy | github, needs | | -| jobs.<job_id>.timeout-minutes | github, needs, strategy, matrix | | -{% endif %} +| `run-name` | `github, inputs, vars` | None | +| `concurrency` | `github, inputs, vars` | None | +| `env` | `github, secrets, inputs, vars` | None | +| `jobs..concurrency` | `github, needs, strategy, matrix, inputs, vars` | None | +| `jobs..container` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..container.credentials` | `github, needs, strategy, matrix, env, vars, secrets, inputs` | None | +| `jobs..container.env.` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, inputs` | None | +| `jobs..container.image` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..continue-on-error` | `github, needs, strategy, vars, matrix, inputs` | None | +| `jobs..defaults.run` | `github, needs, strategy, matrix, env, vars, inputs` | None | +| `jobs..env` | `github, needs, strategy, matrix, vars, secrets, inputs` | None | +| `jobs..environment` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..environment.url` | `github, needs, strategy, matrix, job, runner, env, vars, steps, inputs` | None | +| `jobs..if` | `github, needs, vars, inputs` | `always, cancelled, success, failure` | +| `jobs..name` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..outputs.` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | None | +| `jobs..runs-on` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..secrets.` | `github, needs, strategy, matrix, secrets, inputs, vars` | None | +| `jobs..services` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..services..credentials` | `github, needs, strategy, matrix, env, vars, secrets, inputs` | None | +| `jobs..services..env.` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, inputs` | None | +| `jobs..steps.continue-on-error` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..steps.env` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..steps.if` | `github, needs, strategy, matrix, job, runner, env, vars, steps, inputs` | `always, cancelled, success, failure, hashFiles` | +| `jobs..steps.name` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..steps.run` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..steps.timeout-minutes` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..steps.with` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..steps.working-directory` | `github, needs, strategy, matrix, job, runner, env, vars, secrets, steps, inputs` | `hashFiles` | +| `jobs..strategy` | `github, needs, vars, inputs` | None | +| `jobs..timeout-minutes` | `github, needs, strategy, matrix, vars, inputs` | None | +| `jobs..with.` | `github, needs, strategy, matrix, inputs, vars` | None | +| `on.workflow_call.inputs..default` | `github, inputs, vars` | None | +| `on.workflow_call.outputs..value` | `github, jobs, vars, inputs` | None | + +### Example: printing context information to the log + +...