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.
- .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
For a full list of reusable workflows go to the .github/workflows directory.
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 ..."jobs:
  find_exercise:
    name: Find Exercise Issue
    uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@<git-tag>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.mdTemplates 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/[email protected]
    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: 2Markdown 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 }}These GitHub Actions are particularly useful when creating GitHub Skills Exercises:
- skills/action-text-variables: Replace variables in template files with dynamic content
- skills/action-keyphrase-checker: Verify if specific keyphrases exist in files or content
- GrantBirki/comment: Create comments on GitHub issues or pull requests with support for Nunjucks templating
