Skip to content

Files

Latest commit

110ef2c · Jul 2, 2025

History

History
134 lines (103 loc) · 4.67 KB

README.md

File metadata and controls

134 lines (103 loc) · 4.67 KB

Skills Exercises Toolkit 🛠️

Manufacturetocat

Purpose

This repository serves as a comprehensive toolkit for creating and managing GitHub Skills exercises. It provides a collection of tools, templates, and utilities designed to streamline the process of developing educational content for GitHub Skills.

Contents

  • .github/workflows: GitHub Actions workflows for automating common parts of Skills Exercises
  • markdown-templates: Ready-to-use Markdown templates for creating consistent exercise documentation, instructions, and README files
  • actions: Simple composite actions to help when building GitHub Skills exercises

Examples

⚙️ Reusable Workflows

For a full list of reusable workflows go to the .github/workflows directory.

Starting an exercise

jobs:
  start_exercise:
    name: Start Exercise
    uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@<git-tag>
    with:
      exercise-title: "Introduction to GitHub Copilot"
      intro-message: "Let's get you started with GitHub Copilot :robot: ! We will learn ..."

Finding an exercise

jobs:
  find_exercise:
    name: Find Exercise Issue
    uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@<git-tag>

📋 Markdown Templates

For a full list of markdown templates go to the markdown-templates directory.

steps:
  - name: Get markdown templates
    uses: actions/checkout@v4
    with:
      repository: skills/exercise-toolkit
      path: exercise-toolkit
      ref: <git-tag>

  - name: Use the template
    run: |
      cat exercise-toolkit/markdown-templates/step-feedback/checking-work.md

Using with GrantBirki/comment for issue comments

Templates are often used with GrantBirki/comment to create dynamic comments on issues or pull requests:

steps:
  - name: Get markdown templates
    uses: actions/checkout@v4
    with:
      repository: skills/exercise-toolkit
      path: exercise-toolkit
      ref: <git-tag>

  - name: Create comment - step finished
    uses: GrantBirki/comment@v2.1.1
    with:
      file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
      issue-number: ${{ env.ISSUE_NUMBER }}
      repository: ${{ env.ISSUE_REPOSITORY }}
      vars: |
        next_step_number: 2

Using with action-text-variables for file updates

Markdown templates can also be used with skills/action-text-variables to generate dynamic content for any purpose, e.g updating a file.

steps:
  - name: Get markdown templates
    uses: actions/checkout@v4
    with:
      repository: skills/exercise-toolkit
      path: exercise-toolkit
      ref: <git-tag>

  - name: Build README from template
    id: build-readme
    uses: skills/action-text-variables@v3
    with:
      template-file: exercise-toolkit/markdown-templates/readme/exercise-started.md
      template-vars: |
        title: ${{ inputs.exercise-title }}
        login: ${{ github.actor }}
        issue_url: ${{ needs.create_exercise.outputs.issue-url }}

  - name: Update README file
    run: echo "$README_CONTENT" > README.md
    env:
      README_CONTENT: ${{ steps.build-readme.outputs.updated-text }}

Notable Resources

These GitHub Actions are particularly useful when creating GitHub Skills Exercises: