Skip to content

Commit 56205d5

Browse files
committed
docs: add readmes for workflow modules
1 parent 354f143 commit 56205d5

4 files changed

Lines changed: 83 additions & 1 deletion

File tree

03-core-features/filters/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 03. Core Features
2+
3+
This module demonstrates the building blocks used in all GitHub Actions workflows. Each example workflow is located in `.github/workflows/` and follows the naming pattern `03-core-features--<name>.yaml`.
4+
5+
## Included Workflows
6+
7+
- [**03-core-features--01-hello-world.yaml**](../.github/workflows/03-core-features--01-hello-world.yaml) – the most basic workflow that prints a message from an inline bash step.
8+
- [**03-core-features--02-step-types.yaml**](../.github/workflows/03-core-features--02-step-types.yaml) – shows different step types including bash, Python, and an action from the marketplace.
9+
- [**03-core-features--03-workflows-jobs-steps.yaml**](../.github/workflows/03-core-features--03-workflows-jobs-steps.yaml) – illustrates how workflows are organised into jobs and steps and how jobs can run in parallel or depend on each other.
10+
- [**03-core-features--04-triggers-and-filters.yaml**](../.github/workflows/03-core-features--04-triggers-and-filters.yaml) – explores triggering events and path filters. This workflow watches changes inside [`03-core-features/filters`](./filters/).
11+
- [**03-core-features--05-environment-variables.yaml**](../.github/workflows/03-core-features--05-environment-variables.yaml) – explains variable scoping at workflow, job and step level.
12+
- [**03-core-features--06-passing-data.yaml**](../.github/workflows/03-core-features--06-passing-data.yaml) – passes data between jobs using job outputs and environment variables.
13+
- [**03-core-features--07-secrets-and-variables.yaml**](../.github/workflows/03-core-features--07-secrets-and-variables.yaml) – demonstrates injecting secrets and variables from both the repository and environments.
14+
15+
See the `filters` directory for sample files that are used by the triggers and filters workflow.

04-advanced-features/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 04. Advanced Features
2+
3+
This module covers several advanced capabilities of GitHub Actions. Each topic is demonstrated by a workflow in [`.github/workflows`](../.github/workflows) whose file name begins with `04-advanced-features--`.
4+
5+
## Topics & Workflows
6+
7+
- **Runner Types**[`04-advanced-features--01-runner-types.yaml`](../.github/workflows/04-advanced-features--01-runner-types.yaml)
8+
- shows GitHub-hosted Linux/Windows/macOS runners, container jobs, and a third-party runner
9+
- **Artifacts**[`04-advanced-features--02-artifacts.yaml`](../.github/workflows/04-advanced-features--02-artifacts.yaml)
10+
- one job uploads a text file and a second job downloads and displays it
11+
- **Caching**[`04-advanced-features--03-caching.yaml`](../.github/workflows/04-advanced-features--03-caching.yaml)
12+
- demonstrates the `actions/cache` action and `setup-node` built‑in caching
13+
- **GitHub Permissions**[`04-advanced-features--04-github-permissions.yaml`](../.github/workflows/04-advanced-features--04-github-permissions.yaml)
14+
- compares read-only vs read/write `GITHUB_TOKEN` permissions on pull requests
15+
- **Third-Party Authentication**[`04-advanced-features--05-third-party-auth.yaml`](../.github/workflows/04-advanced-features--05-third-party-auth.yaml)
16+
- contrasts static AWS credentials with OIDC-based authentication
17+
- **Matrix & Conditionals**[`04-advanced-features--06-matrix-and-conditionals.yaml`](../.github/workflows/04-advanced-features--06-matrix-and-conditionals.yaml)
18+
- runs a job across a two-dimensional matrix and skips steps based on conditions
19+
20+
The caching example also includes a minimal Node project in [`caching/minimal-node-project`](./caching/minimal-node-project).

06-authoring-actions/README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
https://docs.github.com/en/actions/sharing-automations/reusing-workflowss
1+
# 06. Authoring Actions
2+
3+
This module demonstrates how to build custom GitHub Actions and reusable workflows. Each example below has a workflow located in `.github/workflows/` following the pattern `06-authoring-actions--<name>.yaml`.
4+
5+
## Composite Action
6+
- **Folder:** `composite-action`
7+
- **Workflow:** [`.github/workflows/06-authoring-actions--01-composite-action.yaml`](../.github/workflows/06-authoring-actions--01-composite-action.yaml)
8+
- **What it does:** defines a simple action that prints a greeting and outputs a
9+
random number. The workflow demonstrates calling the action twice in
10+
separate jobs.
11+
12+
## Reusable Workflows
13+
- **Folder:** `reuseable-workflow`
14+
- **Workflows:**
15+
- [`.github/workflows/06-authoring-actions--02-reuseable-workflows-source.yaml`](../.github/workflows/06-authoring-actions--02-reuseable-workflows-source.yaml) – defines the reusable workflow
16+
- [`.github/workflows/06-authoring-actions--03-reuseable-workflows-caller.yaml`](../.github/workflows/06-authoring-actions--03-reuseable-workflows-caller.yaml) – calls the reusable workflow
17+
- **What they do:** the source workflow exposes inputs and secrets and prints
18+
them in a job. The caller workflow triggers manually and invokes the source
19+
workflow using both a relative path and a specific commit reference.
20+
21+
## JavaScript & TypeScript Actions
22+
- **Folder:** `javascript-actions`
23+
- **Workflow:** [`.github/workflows/06-authoring-actions--04-javascript-actions.yaml`](../.github/workflows/06-authoring-actions--04-javascript-actions.yaml)
24+
- **What it does:** runs three jobs showcasing different approaches for
25+
JavaScript/TypeScript actions:
26+
- `javascript-action-no-build` uses vanilla Node with dependencies committed.
27+
- `javascript-action-with-build` demonstrates a Node action that normally
28+
would require a build step (pulled in as a submodule).
29+
- `typescript-action-with-build` shows a TypeScript action compiled before
30+
execution.
31+
32+
## Container Actions
33+
- **Folder:** `container-actions`
34+
- **Workflow:** [`.github/workflows/06-authoring-actions--05-container-actions.yaml`](../.github/workflows/06-authoring-actions--05-container-actions.yaml)
35+
- **What it does:** runs three jobs that execute container-based actions:
36+
- `shell-dockerfile` builds a shell-based container action from a local
37+
Dockerfile each run.
38+
- `shell-public-container-image` reuses a prebuilt container image to skip the
39+
build step.
40+
- `python-dockerfile` builds and runs a Python action defined by a Dockerfile
41+
and prints a greeting.

09-best-practices/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
1. measure your pipelines (e.g. send data to honeycomb)
2+
2. invest in local iteration (act + task)
3+
3. pull logic out of the workflow
4+
4. cache toolchain
5+
5. cache dependencies
6+
6. use docker cache
7+
7. share logic smartly

0 commit comments

Comments
 (0)