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
Resolve conflicts:
- .gitignore, README.md: keep simplify branch versions
- content/github-actions/: take main's updated content
- Update github-actions content paths from client/ and server/
to app/client/ and app/server/ to match new folder structure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/github-actions/2-code-scanning.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Most projects depend on open source and external libraries. While modern develop
35
35
Public repositories on GitHub automatically have Dependabot alerts enabled. Let's configure Dependabot to also create PRs that update insecure library versions automatically.
36
36
37
37
1. Navigate to your repository on GitHub.
38
-
2. Select **Settings** > **Code security** (under **Security** in the sidebar).
38
+
2. Select **Settings** > **Advanced security** (under **Security** in the sidebar).
39
39
3. Locate the **Dependabot** section.
40
40
41
41

@@ -54,11 +54,11 @@ You've now enabled Dependabot alerts and security updates! When an insecure libr
54
54
55
55
Many developers have accidentally checked in code containing tokens or credentials. Regardless of the reason, even seemingly innocuous tokens can create a security issue. [Secret scanning][about-secret-scanning] detects tokens in your source code and raises alerts. With push protection enabled, pushes containing supported secrets are blocked before they reach your repository.
56
56
57
-
1. On the same **Code security** settings page, locate the **Secret scanning** section.
58
-
2. Next to **Receive alerts on GitHub for detected secrets, keys or other tokens**, select **Enable**.
57
+
1. On the same **Advanced security** settings page, locate the **Secret Protection** section.
58
+
2. Next to **GitHub will always send alerts to partners for detected secrets in public repositories**, select **Enable**.
59
59
3. Next to **Push protection**, select **Enable** to block pushes containing a [supported secret][supported-secrets].
60
60
61
-

61
+

62
62
63
63
You've now enabled secret scanning and push protection — helping prevent credentials from reaching your repository.
64
64
@@ -68,7 +68,7 @@ There is a direct relationship between the amount of code an organization writes
68
68
69
69
Let's enable code scanning with the default CodeQL setup. This runs automatically whenever code is pushed to `main` or a pull request targets `main`, and on a regular schedule to catch newly discovered vulnerabilities.
70
70
71
-
1. On the same **Code security** settings page, locate the **Code scanning** section.
71
+
1. On the same **Advanced security** settings page, locate the **Code scanning** section.
72
72
2. Next to **CodeQL analysis**, select **Set up** > **Default**.
73
73
74
74

Copy file name to clipboardExpand all lines: content/github-actions/3-running-tests.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ Let's build that out!
73
73
pip install -r app/server/requirements.txt
74
74
75
75
- name: Run tests
76
-
working-directory: ./app/server
76
+
working-directory: ./server
77
77
run: |
78
78
python -m unittest test_app -v
79
79
```
@@ -101,7 +101,7 @@ The **`permissions`** block controls what this token can do. For our CI workflow
101
101
102
102
A bit later you'll use a more standard branching approach for changes. But for our purposes right now, let's push straight to `main`. What you'll notice is the workflow will automatically run, since the workflow will now exist on `main`!
103
103
104
-
1. Open the terminal in your codespace by pressing <kbd>Ctrl</kbd>+<kbd>`</kbd>, then stage, commit, and push:
104
+
1. Open the terminal in your codespace by pressing <kbd>Ctl</kbd>+<kbd>`</kbd>, then stage, commit, and push:
105
105
106
106
```bash
107
107
git add .github/workflows/run-tests.yml
@@ -141,15 +141,15 @@ The unit tests cover the API, but the shelter also has Playwright e2e tests that
**Caching**is a technique to speed up your workflows by reusing previously downloaded dependencies instead of fetching them from the internet on every run. This exercise teaches you how to cache Python packages and Node modules so your CI pipeline stays fast as your project grows.
6
+
The [GitHub Actions Marketplace][actions-marketplace]is a collection of pre-built actions created by GitHub and the community. Actions can set up tools, run tests, deploy code, send notifications, and much more. Rather than writing everything from scratch, you can leverage the work of thousands of developers.
7
7
8
-
Along the way you'll also browse the [GitHub Actions Marketplace][actions-marketplace]— a collection of pre-built actions created by GitHub and the community that you can drop into any workflow.
8
+
In this exercise you'll also learn about **caching**— a technique to speed up your workflows by reusing previously downloaded dependencies instead of fetching them from the internet on every run.
9
9
10
10
## Scenario
11
11
@@ -71,7 +71,7 @@ The e2e job has two dependencies to cache — Python packages and the Node modul
71
71
72
72
Now let's push the changes and see the impact of caching.
73
73
74
-
1. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
74
+
1. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
Copy file name to clipboardExpand all lines: content/github-actions/5-matrix-strategies.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,15 +44,15 @@ Let's update the CI workflow to test the API across multiple Python versions.
44
44
pip install -r app/server/requirements.txt
45
45
46
46
- name: Run tests
47
-
working-directory: ./app/server
47
+
working-directory: ./server
48
48
run: |
49
49
python -m unittest test_app -v
50
50
```
51
51
52
52
> [!IMPORTANT]
53
53
> Make sure to quote version numbers like `'3.12'` in the matrix array. Without quotes, YAML may interpret them as floating-point numbers — for example, `3.10` becomes `3.1`, which would cause the setup step to fail.
54
54
55
-
5. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
55
+
5. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), stage, commit, and push your changes:
56
56
57
57
```bash
58
58
git add .github/workflows/run-tests.yml
@@ -126,6 +126,6 @@ Matrix strategies let you test across multiple configurations — language versi
Copy file name to clipboardExpand all lines: content/github-actions/8-reusable-workflows.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ A **composite action** combines multiple *steps* into a single step that runs in
25
25
|**Runner control**| Runs on the caller job's runner | Each job specifies its own runner |
26
26
|**Secrets**| Cannot access secrets directly | Can receive secrets via `secrets:` or `secrets: inherit`|
27
27
|**Logging**| Appears as one collapsed step in the log | Every job and step is logged individually |
28
-
|**Nesting depth**| Up to 10 composite actions per workflow | Up to 4 levels of workflow nesting |
28
+
|**Nesting depth**| Up to 10 composite actions per workflow | Up to 10 levels of workflow nesting |
29
29
|**Marketplace**| Can be published to the [Actions Marketplace][actions-marketplace]| Cannot be published to the Marketplace |
30
30
31
31
**When to use which:**
@@ -69,7 +69,7 @@ on:
69
69
required: true
70
70
```
71
71
72
-
The caller then passes each secret explicitly:
72
+
Then caller then passes each secret explicitly:
73
73
74
74
```yaml
75
75
deploy:
@@ -84,8 +84,6 @@ deploy:
84
84
85
85
> [!IMPORTANT]
86
86
> For deployment workflows that need Azure credentials, `secrets: inherit` is the simplest approach. However, defining specific secrets provides better documentation and prevents accidentally exposing secrets the reusable workflow doesn't need. We'll use `secrets: inherit` in this exercise for simplicity.
87
-
>
88
-
> Note: In this workshop, `azd pipeline config` stored the Azure credentials as **repository variables** (accessed via `vars.*`), not secrets. The example above illustrates the pattern for cases where credentials _are_ stored as secrets.
89
87
90
88
## Create a reusable deployment workflow
91
89
@@ -205,7 +203,7 @@ Now let's add the second caller — a manual deploy workflow for rollbacks and h
205
203
206
204
This workflow is only triggered **manually** via `workflow_dispatch` — it appears as a "Run workflow" button in the Actions tab. It prompts for a **git ref** (a commit SHA, tag, or branch name to deploy), passes that ref to the reusable workflow's `deploy-ref` input, and uses the same deploy logic as the automated pipeline.
207
205
208
-
3. In the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle), commit and push your changes:
206
+
3. In the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle), commit and push your changes:
Copy file name to clipboardExpand all lines: content/github-actions/9-required-workflows.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ Let's create a ruleset that requires our tests to pass, and pull requests to be
94
94
95
95
Let's verify the ruleset is working.
96
96
97
-
1. Return to your codespace and open the terminal (<kbd>Ctrl</kbd>+<kbd>`</kbd> to toggle). Create a new branch and make a small change:
97
+
1. Return to your codespace and open the terminal (<kbd>Ctl</kbd>+<kbd>`</kbd> to toggle). Create a new branch and make a small change:
98
98
99
99
```bash
100
100
git checkout -b test-ruleset
@@ -146,7 +146,7 @@ This pipeline follows the same patterns used by teams across GitHub. As the shel
146
146
147
147
If you want to keep exploring, here are some suggested next steps:
148
148
149
-
- Add a custom CodeQL workflow using [GitHub Advanced Security][github-security].
149
+
- Add a code scanning workflow using [GitHub Advanced Security][github-security].
150
150
- Explore [GitHub Environments][environments-docs] with deployment protection rules for staged deployments (e.g., staging → production with manual approval).
151
151
- Explore the [GitHub Actions Marketplace][actions-marketplace] for community-built actions.
152
152
- Take the [GitHub Skills: Deploy to Azure][skills-deploy-azure] course for a deeper dive into Azure deployment.
0 commit comments