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: Learning-notes/Readme.md
+59-1Lines changed: 59 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,4 +308,62 @@ You can add self-hosted runners at various levels in the management hierarchy:
308
308
- Enterprise-level runners can be assigned to multiple organizations in an enterprise account.
309
309
310
310
To set up self-hosted, you need to add a runner and install the **GitHub Actions Runner** to connect the external compute to the self-hosted runner.
311
-
After installing the GitHub Actions Runner, ensure **port 443** is open in your outbound rules to allow secure communication between the runner and GitHub.
311
+
After installing the GitHub Actions Runner, ensure **port 443** is open in your outbound rules to allow secure communication between the runner and GitHub.
312
+
313
+
#### Workflow Commands Summary
314
+
315
+
Workflow commands in GitHub Actions let you interact with the runner machine during a workflow, performing tasks like setting environment variables, modifying the system PATH, sending debug messages, or sharing data between steps/jobs.
316
+
317
+
- Set Environment Variables
318
+
Add variables for subsequent steps using $GITHUB_ENV:
319
+
320
+
```yaml
321
+
steps:
322
+
- name: Set environment variable
323
+
run: echo "ACTION_ENV=production" >> $GITHUB_ENV
324
+
```
325
+
326
+
- Add to System PATH
327
+
Append a directory to the PATH variable using $GITHUB_PATH:
328
+
329
+
```yaml
330
+
steps:
331
+
- name: Add directory to PATH
332
+
run: echo "/path/to/dir" >> $GITHUB_PATH
333
+
```
334
+
335
+
- Set Output Parameters
336
+
Share data between steps or jobs using $GITHUB_OUTPUT:
337
+
338
+
```yaml
339
+
steps:
340
+
- name: Set output
341
+
id: example_step
342
+
run: echo "result=output_value" >> $GITHUB_OUTPUT
343
+
- name: Use output
344
+
run: echo "The output was ${{ steps.example_step.outputs.result }}"
0 commit comments