Skip to content

Add GitHub Actions workshop section#180

Open
GeekTrainer wants to merge 1 commit intomainfrom
add-github-actions-workshop
Open

Add GitHub Actions workshop section#180
GeekTrainer wants to merge 1 commit intomainfrom
add-github-actions-workshop

Conversation

@GeekTrainer
Copy link
Collaborator

Create a new ~3-hour workshop section covering CI/CD with GitHub Actions.

New content (content/github-actions/)

Exercise Title Est. Time
0 Introduction & Your First CI Workflow ~25 min
1 The Marketplace & Caching ~25 min
2 Matrix Strategies & Parallel Testing ~25 min
3 Deploying to Azure with azd ~35 min
4 Creating Custom Actions ~25 min
5 Reusable Workflows ~25 min
6 Required Workflows, Protection & Wrap-Up ~25 min

Key topics covered

  • CI fundamentals: Triggers, jobs, steps, runners
  • Marketplace & caching: Action discovery, version pinning, pip/npm caching
  • Matrix strategies: Multi-version Python testing, cross-browser Playwright
  • Azure CD via azd: Environments, OIDC, azd init/pipeline config, staged deployment
  • Custom actions: Composite action for DB seeding
  • Reusable workflows: workflow_call for test + deploy patterns
  • Required workflows: Branch protection, org rulesets, workflow_dispatch

Also updates content/README.md to link to the new section.

Create a new ~3-hour workshop section covering CI/CD with GitHub Actions:
- Introduction & first CI workflow
- Marketplace & caching
- Matrix strategies & parallel testing
- Deploying to Azure with azd
- Creating custom actions
- Reusable workflows
- Required workflows, branch protection & wrap-up

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 2, 2026 16:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workshop section to the repo’s workshop content, extending the “Pets workshop” materials with a ~3-hour CI/CD curriculum (CI fundamentals through Azure deployment and governance features).

Changes:

  • Introduces a new content/github-actions/ workshop with 7 exercises (0–6) plus a section README.
  • Covers CI, caching, matrix strategies, Azure deployment via azd, custom actions, reusable workflows, and required workflows/branch protection.
  • Updates content/README.md to link to the new GitHub Actions workshop.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
content/github-actions/README.md New section landing page with prerequisites, exercise list, and navigation links
content/github-actions/0-introduction.md Exercise 0: first CI workflow concepts + initial ci.yml walkthrough
content/github-actions/1-marketplace-and-caching.md Exercise 1: marketplace discovery, caching, and artifacts
content/github-actions/2-matrix-strategies.md Exercise 2: Python matrix strategy + Playwright matrix bonus example
content/github-actions/3-deploy-azure.md Exercise 3: azd-based Azure deployment guidance and staged pipeline example
content/github-actions/4-custom-actions.md Exercise 4: composite action example for DB seeding + usage in CI
content/github-actions/5-reusable-workflows.md Exercise 5: workflow_call reusable workflow patterns for tests/deploy
content/github-actions/6-required-workflows.md Exercise 6: branch protection, required workflows/rulesets, manual triggers
content/README.md Adds GitHub Actions workshop link and updates wording from 2 → 3 workshops
Comments suppressed due to low confidence (4)

content/github-actions/6-required-workflows.md:66

  • Grammar: “Required workflows via rulesets is …” should be “Required workflows via rulesets are …”.
> Required workflows via rulesets is an organization-level feature. If you're working in a personal repository, you can still use branch protection rules (as configured above) for similar enforcement at the repository level.

content/github-actions/3-deploy-azure.md:42

  • Typo in the keyboard shortcut: <kbd>Ctl</kbd> should be <kbd>Ctrl</kbd>.
1. Open the terminal in your codespace (or press <kbd>Ctl</kbd>+<kbd>`</kbd> to toggle it).

content/github-actions/3-deploy-azure.md:154

  • In “Explore the generated workflow”, the “Azure login step” description says it uses azure/login, but the snippet is an azd auth login command. Also, the snippet uses PowerShell backtick line-continuations without showing shell: pwsh; if readers copy/paste into an Ubuntu job (default bash) it will break. Please align the description + snippet and make the shell/line-continuation style explicit.
    - **Azure login step** — Uses the `azure/login` action with OIDC (no stored passwords):

        ```yaml
        - name: Log in with Azure (Federated Credentials)
          run: |
            azd auth login `
              --client-id "$Env:AZURE_CLIENT_ID" `
              --federated-credential-provider "github" `
              --tenant-id "$Env:AZURE_TENANT_ID"
        ```

content/github-actions/3-deploy-azure.md:225

  • This example uses ${{ vars.AZURE_* }} for credentials/config, but earlier the workshop states azd pipeline config stores these as secrets, and later examples in this section use ${{ secrets.AZURE_* }}. Using vars will fail unless users separately create repository/environment variables. Align on secrets (or explicitly add steps instructing users to create variables and explain why).
          - name: Log in with Azure (Federated Credentials)
            run: |
              azd auth login \
                --client-id "${{ vars.AZURE_CLIENT_ID }}" \
                --federated-credential-provider "github" \
                --tenant-id "${{ vars.AZURE_TENANT_ID }}"

          - name: Provision and deploy to staging
            run: azd up --environment staging --no-prompt
            env:
              AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
              AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
              AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}

outputs:
database-file:
description: 'Path to the seeded database file'
value: ${{ steps.seed.outputs.database-file }}
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The composite action output is wired to steps.seed.outputs.database-file, but the seed step never writes database-file to $GITHUB_OUTPUT. Either write the output in the seed step, or change the action output to reference the step that actually sets it (currently id: set-output). As written, ${{ steps.seed.outputs.database-file }} in later workflow examples will resolve empty.

Suggested change
value: ${{ steps.seed.outputs.database-file }}
value: ${{ steps.set-output.outputs.database-file }}

Copilot uses AI. Check for mistakes.
Comment on lines +69 to +74
- name: Seed the database
id: seed
run: python server/utils/seed_test_database.py
shell: bash
env:
DATABASE_PATH: ${{ inputs.database-path }}
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action runs python server/utils/seed_test_database.py, but the repository currently only has server/utils/seed_database.py and it hard-codes the DB path (it doesn't read DATABASE_PATH). The instructions/action example won't work as-is; either add/rename the seeding script and make it honor DATABASE_PATH, or update the workshop to call the existing script and describe the correct behavior.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants