You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/github/github-actions-automate-tasks/includes/2-github-actions-automate-development-tasks.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,3 +167,56 @@ Each type of runner has its benefits, but GitHub-hosted runners offer a quicker
167
167
### GitHub Actions may have usage limits
168
168
169
169
GitHub Actions has some usage limits, depending on your GitHub plan and whether your runner is GitHub-hosted or self-hosted. For more information on usage limits, check out [Usage limits, billing, and administration](https://docs.github.com/actions/reference/usage-limits-billing-and-administration) in the GitHub documentation.
170
+
171
+
## GitHub hosted larger runners
172
+
GitHub offers larger runners for workflows that require more resources. These runners are GitHub-hosted and provide increased CPU, memory, and disk space compared to standard runners. They are designed to handle resource-intensive workflows efficiently, ensuring optimal performance for demanding tasks.
173
+
174
+
### Runner sizes and labels
175
+
Larger runners are available in multiple configurations, providing enhanced vCPUs, RAM, and SSD storage to meet diverse workflow requirements. These configurations are ideal for scenarios such as:
176
+
- Compiling large codebases with extensive source files.
177
+
- Running comprehensive test suites, including integration and end-to-end tests.
178
+
- Processing large datasets for data analysis or machine learning tasks.
179
+
- Building applications with complex dependencies or large binary outputs.
180
+
- Performing high-performance simulations or computational modeling.
181
+
- Executing video encoding, rendering, or other multimedia processing workflows.
182
+
183
+
To use a larger runner, specify the desired runner label in the `runs-on` attribute of your workflow file. For example, to use a runner with 16 vCPUs and 64 GB of RAM, you would set `runs-on: ubuntu-latest-16core`.
184
+
185
+
```yml
186
+
jobs:
187
+
build:
188
+
runs-on: ubuntu-latest-16core
189
+
steps:
190
+
- uses: actions/checkout@v2
191
+
- name: Build project
192
+
run: make build
193
+
```
194
+
These larger runners maintain compatibility with existing workflows by including the same preinstalled tools as standard `ubuntu-latest` runners.
195
+
196
+
For more details on runner sizes for larger runners, refer to the GitHub documentation [https://docs.github.com/en/actions/using-github-hosted-runners/using-larger-runners/about-larger-runners#machine-sizes-for-larger-runners]
197
+
198
+
199
+
### Managing larger runners
200
+
GitHub provides tools to manage larger runners effectively, ensuring optimal resource utilization and cost management. Here are some key aspects of managing larger runners:
201
+
202
+
#### Monitoring usage
203
+
You can monitor the usage of larger runners through the GitHub Actions usage page in your repository or organization settings. This page provides insights into the number of jobs run, the total runtime, and the associated costs.
204
+
205
+
#### Managing access
206
+
To control access to larger runners, you can configure repository or organization-level policies. This ensures that only authorized workflows or teams can use these high-resource runners.
207
+
208
+
#### Cost management
209
+
Larger runners incur additional costs based on their usage. To manage costs, consider the following:
210
+
- Use larger runners only for workflows that require high resources.
211
+
- Optimize workflows to reduce runtime.
212
+
- Monitor billing details regularly to track expenses.
213
+
214
+
#### Scaling workflows
215
+
If your workflows require frequent use of larger runners, consider scaling strategies such as:
216
+
- Using self-hosted runners for predictable workloads.
217
+
- Splitting workflows into smaller jobs to distribute the load across standard runners.
Copy file name to clipboardExpand all lines: learn-pr/github/github-actions-automate-tasks/includes/2c-configure-github-actions-workflow.md
+124Lines changed: 124 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,128 @@ on:
67
67
types: [rerequested, requested_action]
68
68
```
69
69
70
+
<!-- INFOMAGNUS UPDATES for sub OD 1.1.4 go here. Source Material: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#repository_dispatch -->
71
+
72
+
## Repository_dispatch
73
+
`repository_dispatch`is a custom event in GitHub Actions that allows external systems (or even other GitHub workflows) to manually trigger workflows by sending a POST request to the GitHub API.
74
+
It enables flexible automation and integration with outside tools, scripts, or systems that need to start workflows in your repo.
| `event_type` | string | A custom name for the event. This maps to the types value in your workflow trigger | Yes
140
+
| `client_payload` | object | Arbitrary JSON payload to send custom data to the workflow (github.event.client_payload) | No
141
+
| No |
142
+
143
+
#### Repository_dispatch parameters breakdown
144
+
When making a POST request to the GitHub API endpoint, you must pass a JSON body with two main parameters:
145
+
- event_type
146
+
- client_payload
147
+
148
+
##### event_type
149
+
150
+
This is a required custom string you define that GitHub will treat as the "action" or "type" of the dispatch. It’s used to identify what triggered the workflow and filter workflows that are listening for specific types.
- Use in Workflow: Used in listening for specific event types and accessing the value inside the workflow. This helps with the reuse of a single workflow for multiple purposes and makes automation more organized and event-driven.
This is a free-form JSON object that lets you send custom data along with the dispatch. You define the structure, and it's accessible inside the workflow.
165
+
- Format:
166
+
- Type: object
167
+
- Custom keys and values
168
+
169
+
- Use in Workflow: Used for multi-environment deployments, versioned releases, or passing context from another system or pipeline and enables parameterized workflows, similar to input arguments.
Within your workflow file, you can access context information and evaluate expressions. Although expressions are commonly used with the conditional `if` keyword in a workflow file to determine whether a step should run or not, you can use any supported context and expression to create a conditional. It's important to know that when using conditionals in your workflow, you need to use the specific syntax `${{ <expression> }}`. This tells GitHub to evaluate an expression rather than treat it as a string.
@@ -88,6 +210,8 @@ Notice that in this example, the `${{ }}` are missing from the syntax. With some
88
210
89
211
For more information about workflow syntax and expressions, check out [Workflow syntax for GitHub Actions](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif).
90
212
213
+
<!-- INFOMAGNUS UPDATES for sub OD 1.5.3, 1.5.4., 1.5.5., 1.5.6, 1.5.7, and 1.5.8 go here. Source Material: Infomagnus to find source material and cite -->
214
+
91
215
## Disable and delete workflows
92
216
93
217
After adding a workflow to your repository, you might find a situation where you want to temporarily disable the workflow. You can stop a workflow from being triggered without having to delete the file from the repo, either on GitHub or through the GitHub REST API. When you wish to enable the workflow again, you can easily do it using the same methods.
0 commit comments