@@ -19,11 +24,11 @@ If you'd like to make a profile README, use the quickstart instructions below or
2. Create a file named `README.md` in its root. The "root" means not inside any folder in your repository.
3. Edit the contents of the `README.md` file.
4. If you created a new branch for your file, open and merge a pull request on your branch.
-5. Lastly, we'd love to hear what you thought of this exercise [in our discussion board](https://github.com/orgs/skills/discussions/categories/introduction-to-github).
+5. Lastly, we'd love to hear what you thought of this course [in our discussion board](https://github.com/orgs/skills/discussions/categories/introduction-to-github).
Check out these resources to learn more or get involved:
- Are you a student? Check out the [Student Developer Pack](https://education.github.com/pack).
-- [Take another GitHub Skills exercise](https://learn.github.com/skills).
+- [Take another GitHub Skills course](https://github.com/skills).
- [Read the GitHub Getting Started docs](https://docs.github.com/en/get-started).
- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore).
diff --git a/.github/workflows/0-start-exercise.yml b/.github/workflows/0-start-exercise.yml
deleted file mode 100644
index 022fb983d..000000000
--- a/.github/workflows/0-start-exercise.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-name: Step 0 # Start Exercise
-
-on:
- push:
- branches:
- - main
-
-permissions:
- contents: write # Update Readme
- actions: write # Disable/enable workflows
- issues: write # Create issue and comment on issues
-
-env:
- STEP_1_FILE: ".github/steps/1-create-a-branch.md"
-
-jobs:
- start_exercise:
- if: |
- !github.event.repository.is_template
- name: Start Exercise
- uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.7.0
- with:
- exercise-title: "Introduction to GitHub"
- intro-message: "If you are new to GitHub, you might find your fellow developers use ___**issues**___ to organize their work and collaborate. We will do the same! That's another lesson, but today, we will introduce you to the basics."
-
- post_next_step_content:
- name: Post next step content
- runs-on: ubuntu-latest
- needs: [start_exercise]
- env:
- ISSUE_REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ needs.start_exercise.outputs.issue-number }}
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Get response templates
- uses: actions/checkout@v4
- with:
- repository: skills/exercise-toolkit
- path: exercise-toolkit
- ref: v0.7.0
-
- - name: Create comment - add step content
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: ${{ env.STEP_1_FILE }}
-
- - name: Create comment - watching for progress
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
-
- - name: Disable current workflow and enable next one
- run: |
- gh workflow enable "Step 1"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/0-welcome.yml b/.github/workflows/0-welcome.yml
new file mode 100644
index 000000000..1ee77397f
--- /dev/null
+++ b/.github/workflows/0-welcome.yml
@@ -0,0 +1,64 @@
+name: Step 0, Welcome
+
+# This step triggers after the learner creates a new repository from the template.
+# This workflow updates from step 0 to step 1.
+
+# This will run every time we create push a commit to `main`.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
+
+jobs:
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_welcome:
+ name: On welcome
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 0.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 0 }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
+
+ steps:
+ # We'll need to check out the repository so that we can edit README.md.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
+
+ # In README.md, switch step 0 for step 1.
+ - name: Update to step 1
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 0
+ to_step: 1
+ branch_name: my-first-branch
diff --git a/.github/workflows/1-create-a-branch.yml b/.github/workflows/1-create-a-branch.yml
index c6ddf8f8a..5dd9cbe69 100644
--- a/.github/workflows/1-create-a-branch.yml
+++ b/.github/workflows/1-create-a-branch.yml
@@ -1,73 +1,66 @@
-name: Step 1 # Create a branch
+name: Step 1, Create a branch
-# Checks if the learner completed tasks for step 1.
-# - Triggers when the user creates a new branch 'my-first-branch'.
-# - Checks that the branch name is 'my-first-branch'.
-# - If all checks pass, the workflow is disabled so it doesn't run again. As such, workflow status badge will change to green.
+# This step listens for the learner to create branch `my-first-branch`.
+# This workflow updates from step 1 to step 2.
+# This will run every time we create a branch or tag.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
on:
- push:
- branches:
- - "my-first-branch"
+ workflow_dispatch:
+ create:
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
- contents: read
- actions: write
- issues: write
-
-env:
- STEP_2_FILE: ".github/steps/2-commit-a-file.md"
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
jobs:
- find_exercise:
- name: Find Exercise Issue
- uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
-
- post_next_step_content:
- name: Post next step content
- needs: [find_exercise]
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
runs-on: ubuntu-latest
- env:
- ISSUE_REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
-
steps:
- name: Checkout
uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
- - name: Get response templates
- uses: actions/checkout@v4
- with:
- repository: skills/exercise-toolkit
- path: exercise-toolkit
- ref: v0.7.0
+ on_create_a_branch:
+ name: On create a branch
+ needs: get_current_step
- - name: Create comment - step finished
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
- vars: |
- next_step_number: 2
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 1.
+ # 3. The event is a branch.
+ # 4. The branch name is `my-first-branch`.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 1
+ && github.ref_type == 'branch'
+ && github.ref_name == 'my-first-branch' }}
- - name: Create comment - add step content
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: ${{ env.STEP_2_FILE }}
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
- - name: Create comment - watching for progress
- uses: GrantBirki/comment@v2.1.1
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
+ fetch-depth: 0 # Let's get all the branches.
- - name: Disable current workflow and enable next one
- run: |
- gh workflow disable "${{github.workflow}}"
- gh workflow enable "Step 2"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # In README.md, switch step 1 for step 2.
+ - name: Update to step 2
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 1
+ to_step: 2
+ branch_name: my-first-branch
diff --git a/.github/workflows/2-commit-a-file.yml b/.github/workflows/2-commit-a-file.yml
index 8230c70bd..bfa74d828 100644
--- a/.github/workflows/2-commit-a-file.yml
+++ b/.github/workflows/2-commit-a-file.yml
@@ -1,73 +1,64 @@
-name: Step 2 # Commit a file
+name: Step 2, Commit a file
-# Checks if the learner completed tasks for step 2.
-# - Triggers when the user makes a push to the branch 'my-first-branch' and modifies the file 'PROFILE.md'.
+# This step listens for the learner to commit a file to branch `my-first-branch`.
+# This workflow updates from step 2 to step 3.
+# This action will run every time there's a push to `my-first-branch`.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
on:
+ workflow_dispatch:
push:
branches:
- - "my-first-branch"
- paths:
- - "PROFILE.md"
+ - my-first-branch
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
- contents: read
- actions: write
- issues: write
-
-env:
- STEP_3_FILE: ".github/steps/3-open-a-pull-request.md"
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
jobs:
- find_exercise:
- name: Find Exercise Issue
- uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
-
- post_next_step_content:
- name: Post next step content
- needs: [find_exercise]
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
runs-on: ubuntu-latest
- env:
- ISSUE_REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
-
steps:
- name: Checkout
uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
- - name: Get response templates
- uses: actions/checkout@v4
- with:
- repository: skills/exercise-toolkit
- path: exercise-toolkit
- ref: v0.7.0
+ on_commit_a_file:
+ name: On commit a file
+ needs: get_current_step
- - name: Create comment - step finished
- uses: GrantBirki/comment@v2.1.1
- with:
- issue-number: ${{ env.ISSUE_NUMBER }}
- repository: ${{ env.ISSUE_REPOSITORY }}
- file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
- vars: |
- next_step_number: 3
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 2.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 2 }}
- - name: Create comment - add step content
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: ${{ env.STEP_3_FILE }}
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
- - name: Create comment - watching for progress
- uses: GrantBirki/comment@v2.1.1
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
+ fetch-depth: 0 # Let's get all the branches.
- - name: Disable current workflow and enable next one
- run: |
- gh workflow disable "${{github.workflow}}"
- gh workflow enable "Step 3"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # In README.md, switch step 2 for step 3.
+ - name: Update to step 3
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 2
+ to_step: 3
+ branch_name: my-first-branch
diff --git a/.github/workflows/3-open-a-pull-request.yml b/.github/workflows/3-open-a-pull-request.yml
index e1642f11c..23c636c26 100644
--- a/.github/workflows/3-open-a-pull-request.yml
+++ b/.github/workflows/3-open-a-pull-request.yml
@@ -1,161 +1,68 @@
-name: Step 3 # Open a pull request
+name: Step 3, Open a pull request
-# Checks if the learner completed tasks for step 3.
-# - Triggers when the user creates or edits the pull request.
-# - Checks the pull request title and description. Adds a PR comment.
-# - If all checks pass, the workflow is disabled so it doesn't run again. As such, workflow status badge will change to green.
+# This step listens for the learner to open a pull request with branch `my-first-branch`.
+# This workflow updates from step 3 to step 4.
+# This will run every time we create a branch or tag.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
on:
+ workflow_dispatch:
pull_request:
- branches:
- - main
types:
- opened
- - synchronize
- reopened
- - edited
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
- contents: read
- actions: write
- issues: write
-
-env:
- STEP_4_FILE: ".github/steps/4-merge-your-pull-request.md"
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
+ contents: write
jobs:
- find_exercise:
- if: |
- !github.event.repository.is_template &&
- github.head_ref == 'my-first-branch'
- name: Find Exercise Issue
- uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
-
- check_step_work:
- name: Check step work
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
runs-on: ubuntu-latest
- needs: find_exercise
- env:
- ISSUE_REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
-
steps:
- name: Checkout
uses: actions/checkout@v4
-
- - name: Get response templates
- uses: actions/checkout@v4
- with:
- repository: skills/exercise-toolkit
- path: exercise-toolkit
- ref: v0.7.0
-
- - name: Find last comment
- id: find-last-comment
- uses: peter-evans/find-comment@v3
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- direction: last
-
- - name: Update comment - checking work
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- comment-id: ${{ steps.find-last-comment.outputs.comment-id }}
- file: exercise-toolkit/markdown-templates/step-feedback/checking-work.md
- edit-mode: replace
-
- # START: Check practical exercise
-
- - name: Check PR title for keyphrase
- id: check-pr-title
- continue-on-error: true
- uses: skills/action-keyphrase-checker@v1
- with:
- keyphrase: "Add my first file"
- text: ${{ github.event.pull_request.title }}
- case-sensitive: false
-
- - name: Check PR description is non-empty
- id: check-pr-description
- continue-on-error: true
+ - id: get_step
run: |
- if [ -n "$PR_BODY" ]; then
- echo "STEP_MESSAGE=Pull request description" >> $GITHUB_OUTPUT
- else
- echo "STEP_MESSAGE=Pull request description is empty" >> $GITHUB_OUTPUT
- exit 1
- fi
- env:
- PR_BODY: ${{ github.event.pull_request.body }}
-
- - name: Update comment - step results
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- comment-id: ${{ steps.find-last-comment.outputs.comment-id }}
- file: exercise-toolkit/markdown-templates/step-feedback/step-results-table.md
- edit-mode: replace
- vars: |
- step_number: 3
- results_table:
- - description: "Pull Request title matches"
- passed: ${{ steps.check-pr-title.outcome == 'success' }}
- - description: ${{ steps.check-pr-description.outputs.STEP_MESSAGE }}
- passed: ${{ steps.check-pr-description.outcome == 'success' }}
-
- - name: Fail job if not all checks passed
- if: contains(steps.*.outcome, 'failure')
- run: exit 1
-
- post_next_step_content:
- name: Post next step content
- needs: [find_exercise, check_step_work]
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
+
+ on_open_a_pull_request:
+ name: On open a pull request
+ needs: get_current_step
+
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 3.
+ # 3. The head branch name is `my-first-branch`.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 3
+ && github.head_ref == 'my-first-branch' }}
+
+ # We'll run Ubuntu for performance instead of Mac or Windows.
runs-on: ubuntu-latest
- env:
- ISSUE_REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
+ # We'll need to check out the repository so that we can edit the README.
- name: Checkout
uses: actions/checkout@v4
-
- - name: Get response templates
- uses: actions/checkout@v4
with:
- repository: skills/exercise-toolkit
- path: exercise-toolkit
- ref: v0.7.0
+ fetch-depth: 0 # Let's get all the branches.
+ ref: my-first-branch # Important, as normally `pull_request` event won't grab other branches.
- - name: Create comment - step finished
- uses: GrantBirki/comment@v2.1.1
+ # In README.md, switch step 3 for step 4.
+ - name: Update to step 4
+ uses: skills/action-update-step@v2
with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
- vars: |
- next_step_number: 4
-
- - name: Create comment - add step content
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: ${{ env.STEP_4_FILE }}
-
- - name: Create comment - watching for progress
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
-
- - name: Disable current workflow and enable next one
- run: |
- gh workflow disable "${{github.workflow}}"
- gh workflow enable "Step 4"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 3
+ to_step: 4
+ branch_name: my-first-branch
diff --git a/.github/workflows/4-merge-your-pull-request.yml b/.github/workflows/4-merge-your-pull-request.yml
index 4f032e108..ae2e4bc65 100644
--- a/.github/workflows/4-merge-your-pull-request.yml
+++ b/.github/workflows/4-merge-your-pull-request.yml
@@ -1,73 +1,64 @@
-name: Step 4 # Merge your pull request
+name: Step 4, Merge your pull request
-# Checks if the learner completed tasks for step 4.
-# - Triggers when the user merges the pull request.
-# - If all checks pass, the workflow is disabled so it doesn't run again. As such, workflow status badge will change to green.
+# This step listens for the learner to merge a pull request with branch `my-first-branch`.
+# This workflow updates from step 4 to step X.
+# This will run every time we create push a commit to `main`.
+# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
on:
- pull_request:
+ workflow_dispatch:
+ push:
branches:
- main
- types:
- - closed
+# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
+ # Need `contents: read` to checkout the repository.
+ # Need `contents: write` to update the step metadata.
contents: write
- actions: write
- issues: write
-
-env:
- REVIEW_FILE: ".github/steps/x-review.md"
jobs:
- find_exercise:
- name: Find Exercise Issue
- uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.5.0
-
- post_review_content:
- name: Post review content
- needs: [find_exercise]
+ # Get the current step to only run the main job when the learner is on the same step.
+ get_current_step:
+ name: Check current step number
runs-on: ubuntu-latest
- if: |
- !github.event.repository.is_template
- env:
- ISSUE_REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
-
steps:
- name: Checkout
uses: actions/checkout@v4
+ - id: get_step
+ run: |
+ echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
+ outputs:
+ current_step: ${{ steps.get_step.outputs.current_step }}
- - name: Get response templates
- uses: actions/checkout@v4
- with:
- repository: skills/exercise-toolkit
- path: exercise-toolkit
- ref: v0.7.0
+ on_merge_your_pull_request:
+ name: On merge your pull request
+ needs: get_current_step
- - name: Create comment - step finished
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: exercise-toolkit/markdown-templates/step-feedback/lesson-review.md
+ # We will only run this action when:
+ # 1. This repository isn't the template repository.
+ # 2. The step is currently 4.
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
+ # Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
+ if: >-
+ ${{ !github.event.repository.is_template
+ && needs.get_current_step.outputs.current_step == 4 }}
- - name: Create comment - add review content
- uses: GrantBirki/comment@v2.1.1
- with:
- repository: ${{ env.ISSUE_REPOSITORY }}
- issue-number: ${{ env.ISSUE_NUMBER }}
- file: ${{ env.REVIEW_FILE }}
+ # We'll run Ubuntu for performance instead of Mac or Windows.
+ runs-on: ubuntu-latest
- - name: Disable current workflow
- run: gh workflow disable "${{github.workflow}}"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ # We'll need to check out the repository so that we can edit the README.
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Let's get all the branches.
- finish_exercise:
- name: Finish Exercise
- needs: [find_exercise, post_review_content]
- uses: skills/exercise-toolkit/.github/workflows/finish-exercise.yml@v0.7.0
- with:
- issue-url: ${{ needs.find_exercise.outputs.issue-url }}
- exercise-title: "Introduction to GitHub"
+ # In README.md, switch step 4 for step X.
+ - name: Update to step X
+ uses: skills/action-update-step@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ from_step: 4
+ to_step: X
+ branch_name: my-first-branch
diff --git a/README.md b/README.md
index 6331fa595..79ea84fca 100644
--- a/README.md
+++ b/README.md
@@ -1,47 +1,74 @@
+ce{t`n?do7bqy$
zq;M#N_bb+Wkt~4u?^c-O0@(kqL;d`RP)tKYPVW7xVeV#W>Ev$X?4d<-BJwOj@OM3jKA4(?y)0#t5O$;%=ym7z*_Yl3C+S?v9q4{Cyr@TZt{JBp%5}Mh|JWgG?#H$rl=etx6w>~N?9R+nszPGt;+@w4pY)>cqUp_!suh;eDc=_IJ
zC-t}Kto!2kP2Q^Y+iMJ$tM^O-T}&osee?i2K$Gm)X@=KgQ9#}t&+HL
P1HF@N%fX111I%_#%4%20z)}v`d8r`GPESEB1E}x`1hRlgqPMrFfdKV+
z;fIXBZU
wISq>g(&-x|0e-yEM$WG0vg;Y%9^r6zY$*s>kR
zEt?o1^ADN3p75V?+Sz@%1X$a%5(=9OSpc90WZzOF$bryb_^b86l?;uP0t6HM
zzYv<%gk*aF$m0E`OOPMIXFm5mJXwY$`zX)3?4{wK{7-y!FZQYIewtQPrVFf$ta0ee
zrK9Hd3Sva>l}Pm*&PIH-$m6v~_u6h3H#OZD8*Y2lyLv(8VaaCogD_X5m-EUqcl(V2
zhr7a`uUArXRGiquAA{eX{+VFmoLb}0V}zG|LPc-2sZjW=R_Z`CFGm^)M
pOeB|
zjk7>W3nstoZZhki4KLaTdm27O1QbHO4OR3