GitHub Actions
GitHub Actions Certification
- Automate development tasks by using GitHub Actions
- Build continuous integration (CI) workflows by using GitHub Actions
- Leverage GitHub Actions to publish to GitHub Packages
-
Create and publish custom GitHub actions
- Build and deploy applications to Azure by using GitHub Actions
-
Manage GitHub Actions in the enterprise
- https://learn.microsoft.com/en-us/training/modules/manage-github-actions-enterprise/manage-actions-workflows
- https://learn.microsoft.com/en-us/training/modules/manage-github-actions-enterprise/manage-runners
- https://learn.microsoft.com/en-us/training/modules/manage-github-actions-enterprise/manage-encrypted-secrets
Study Guide
GitHub Packages
workflow syntax
self-hosted runners
Use on.workflow_call to define the inputs and outputs for a reusable workflow. You can also map the secrets that are available to the called workflow.
Before each job begins, GitHub fetches an installation access token for the job. The GITHUB_TOKEN expires when a job finishes or after a maximum of 24 hours.
By default, any string is rendered in plain-text in the logs of a workflow run. You can mask a string with the add-mask workflow command.
A self-hosted runner automatically receives certain labels when it is added to GitHub Actions. These are used to indicate its operating system and hardware platform:
self-hosted: Default label applied to all self-hosted runners.
linux, windows, or macOS: Applied depending on operating system.
x64, ARM, or ARM64: Applied depending on hardware architecture.
The maximum number of minutes to let a job run before GitHub automatically cancels it. Default: 360. If the timeout exceeds the job execution time limit for the runner, the job will be canceled when the execution time limit is met instead.
You can set a timeout for a specific job within a GitHub Actions workflow by using the jobs.<job_id>.timeout-minutes attribute in the job definition.
Use jobs.<job_id>.strategy.matrix to define a matrix of different job configurations. Within your matrix, define one or more variables followed by an array of values. For example, the following matrix has a variable called version with the value [10, 12, 14] and a variable called os with the value [ubuntu-latest, windows-latest]:
You can download the artifacts generated by a workflow run using the GitHub REST API by sending a GET request to the /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip endpoint.
The name of a workflow is an optional attribute. GitHub displays the names of your workflows on your repository's "Actions" tab. If you omit name, GitHub sets it to the workflow file path relative to the root of the repository.
GitHub-hosted runners provide a clean instance for every job execution. Self-hosted runners don't need to have a clean instance for every job execution.
To enable users to customize the behavior of your custom action by providing optional settings, you can define additional inputs in the action.yml file with default values.
GitHub Action doesn't provide a built-in feature for this use case. You can use a community action to implement the functionality.