![]() The top-level context available during any job or step in a workflow. For more information, see " Security hardening for GitHub Actions." Property name Certain contexts should be treated as untrusted input, as an attacker could insert their own malicious content. Warning: When creating workflows and actions, you should always consider whether your code might execute untrusted input from possible attackers. For more information about environment variables, see " Variables." You can also read most of the github context data in environment variables. ![]() The github context contains information about the workflow run and the event that triggered the run. The following example demonstrates how these different types of variables can be used together in a job: name: CI on: push jobs: prod-check: if: $ run: echo "$MATRIX_CONTEXT" github context For details of where you can use various contexts within a workflow, see " Context availability." Once the job is running, you can also retrieve context variables from the runner that is executing the job, such as runner.os. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |