├── .github ├── dependabot.yml ├── script │ ├── STEP │ └── check-file.sh └── workflows │ ├── 0-start.yml │ ├── 1-add-headers.yml │ ├── 2-add-an-image.yml │ ├── 3-add-a-code-example.yml │ ├── 4-make-a-task-list.yml │ ├── 5-merge-your-pull-request.yml │ └── classroom.yml ├── .gitignore ├── LICENSE ├── README.md └── index.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | -------------------------------------------------------------------------------- /.github/script/STEP: -------------------------------------------------------------------------------- 1 | X 2 | -------------------------------------------------------------------------------- /.github/script/check-file.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Make sure this file is executable 3 | # chmod a+x .github/script/check-file.sh 4 | 5 | # Make sure to escape your backslashes => \\ <= in YAML 6 | # So that its still a single \ in bash 7 | 8 | echo "Check that $FILE includes $SEARCH" 9 | if grep --extended-regexp "$SEARCH" -- $FILE 10 | then 11 | echo "Found $SEARCH in $FILE" 12 | else 13 | echo "Missing $SEARCH in $FILE" 14 | echo "----------------" 15 | echo "$(cat $FILE)" 16 | exit 204 # We're sending a weird code so it looks different from other "failures" 17 | fi 18 | -------------------------------------------------------------------------------- /.github/workflows/0-start.yml: -------------------------------------------------------------------------------- 1 | name: Step 0, Start 2 | 3 | # This step triggers after the learner creates a new repository from the template 4 | # This step sets STEP to 1 5 | # This step closes
and opens
6 | 7 | # This will run every time we create push a commit to `main` 8 | # Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: 13 | - main 14 | 15 | # Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication 16 | permissions: 17 | # Need `contents: read` to checkout the repository 18 | # Need `contents: write` to update the step metadata 19 | # Need `pull-requests: write` to create a pull request 20 | contents: write 21 | pull-requests: write 22 | 23 | jobs: 24 | # Get the current step from .github/script/STEP so we can 25 | # limit running the main job when the learner is on the same step. 26 | get_current_step: 27 | name: Check current step number 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Checkout 31 | uses: actions/checkout@v4 32 | - id: get_step 33 | run: | 34 | echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT 35 | outputs: 36 | current_step: ${{ steps.get_step.outputs.current_step }} 37 | 38 | on_start: 39 | name: On start 40 | needs: get_current_step 41 | 42 | # We will only run this action when: 43 | # 1. This repository isn't the template repository 44 | # 2. The STEP is currently 0 45 | # Reference https://docs.github.com/en/actions/learn-github-actions/contexts 46 | # Reference https://docs.github.com/en/actions/learn-github-actions/expressions 47 | if: >- 48 | ${{ !github.event.repository.is_template 49 | && needs.get_current_step.outputs.current_step == 0 }} 50 | 51 | # We'll run Ubuntu for performance instead of Mac or Windows 52 | runs-on: ubuntu-latest 53 | 54 | steps: 55 | # We'll need to check out the repository so that we can edit the README 56 | - name: Checkout 57 | uses: actions/checkout@v4 58 | with: 59 | fetch-depth: 0 # Let's get all the branches 60 | 61 | # Make a branch, file, commit, and pull request for the learner 62 | - name: Prepare a pull request, branch, and file 63 | run: | 64 | echo "Make sure we are on step 0" 65 | if [ "$(cat .github/script/STEP)" != 0 ] 66 | then 67 | echo "Current step is not 0" 68 | exit 0 69 | fi 70 | 71 | echo "Make a branch" 72 | BRANCH=start-markdown 73 | git pull 74 | git checkout -b $BRANCH 75 | 76 | echo "Make a file" 77 | touch index.md 78 | 79 | echo "Make a commit" 80 | git config user.name github-actions 81 | git config user.email github-actions@github.com 82 | git add index.md 83 | git commit --message="Create index.md file" 84 | 85 | echo "Push" 86 | git push --set-upstream origin $BRANCH 87 | 88 | echo "Restore main" 89 | git checkout main 90 | env: 91 | GITHUB_TOKEN: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 92 | 93 | # Update README to close
and open
94 | # and set STEP to '1' 95 | - name: Update to step 1 96 | uses: skills/action-update-step@v2 97 | with: 98 | token: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 99 | from_step: 0 100 | to_step: 1 101 | branch_name: start-markdown 102 | env: 103 | GITHUB_TOKEN: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 104 | 105 | # Commits pushed by an Action will not create a new workflow run. To work 106 | # around this, create a repository_dispatch event to ensure that GitHub 107 | # Classroom's autograding workflow runs on the commit created by 108 | # skills/action-update-step. 109 | # Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow 110 | - name: Trigger autograding workflow 111 | run: | 112 | gh api \ 113 | --method POST \ 114 | -H "Accept: application/vnd.github+json" \ 115 | "/repos/${GITHUB_REPOSITORY}/dispatches" \ 116 | -f "event_type=autograde" 117 | env: 118 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 119 | -------------------------------------------------------------------------------- /.github/workflows/1-add-headers.yml: -------------------------------------------------------------------------------- 1 | name: Step 1, Add headers 2 | 3 | # This step triggers after a commit on the branch `start-markdown` 4 | # This step sets STEP to 2 5 | # This step closes
and opens
6 | 7 | # This will run every time we create push a commit to `start-markdown` 8 | # Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: 13 | - start-markdown 14 | 15 | # Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication 16 | permissions: 17 | # Need `contents: read` to checkout the repository 18 | # Need `contents: write` to update the step metadata 19 | contents: write 20 | 21 | jobs: 22 | # Get the current step from .github/script/STEP so we can 23 | # limit running the main job when the learner is on the same step. 24 | get_current_step: 25 | name: Check current step number 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | - id: get_step 31 | run: | 32 | echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT 33 | outputs: 34 | current_step: ${{ steps.get_step.outputs.current_step }} 35 | 36 | on_commit_start_markdown_headers: 37 | name: On commit, start markdown, headers 38 | needs: get_current_step 39 | 40 | # We will only run this action when: 41 | # 1. This repository isn't the template repository 42 | # 2. The STEP is currently 1 43 | # Reference https://docs.github.com/en/actions/learn-github-actions/contexts 44 | # Reference https://docs.github.com/en/actions/learn-github-actions/expressions 45 | if: >- 46 | ${{ !github.event.repository.is_template 47 | && needs.get_current_step.outputs.current_step == 1 }} 48 | 49 | # We'll run Ubuntu for performance instead of Mac or Windows 50 | runs-on: ubuntu-latest 51 | 52 | steps: 53 | # We'll need to check out the repository so that we can edit the README 54 | - name: Checkout 55 | uses: actions/checkout@v4 56 | with: 57 | fetch-depth: 0 # Let's get all the branches 58 | 59 | # Check that there is at least one header in the markdown file 60 | - name: Check markdown syntax, header 61 | run: ./.github/script/check-file.sh 62 | env: 63 | FILE: "index.md" 64 | SEARCH: "# [a-zA-Z0-9]" 65 | 66 | # Update README to close
and open
67 | # and set STEP to '2' 68 | - name: Update to step 2 69 | uses: skills/action-update-step@v2 70 | with: 71 | token: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 72 | from_step: 1 73 | to_step: 2 74 | branch_name: start-markdown 75 | 76 | # Commits pushed by an Action will not create a new workflow run. To work 77 | # around this, create a repository_dispatch event to ensure that GitHub 78 | # Classroom's autograding workflow runs on the commit created by 79 | # skills/action-update-step. 80 | # Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow 81 | - name: Trigger autograding workflow 82 | run: | 83 | gh api \ 84 | --method POST \ 85 | -H "Accept: application/vnd.github+json" \ 86 | "/repos/${GITHUB_REPOSITORY}/dispatches" \ 87 | -f "event_type=autograde" 88 | env: 89 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 90 | -------------------------------------------------------------------------------- /.github/workflows/2-add-an-image.yml: -------------------------------------------------------------------------------- 1 | name: Step 2, Add an image 2 | 3 | # This step triggers after a commit on the branch `start-markdown` 4 | # This step sets STEP to 3 5 | # This step closes
and opens
6 | 7 | # This will run every time we create push a commit to `start-markdown` 8 | # Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: 13 | - start-markdown 14 | 15 | # Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication 16 | permissions: 17 | # Need `contents: read` to checkout the repository 18 | # Need `contents: write` to update the step metadata 19 | contents: write 20 | 21 | jobs: 22 | # Get the current step from .github/script/STEP so we can 23 | # limit running the main job when the learner is on the same step. 24 | get_current_step: 25 | name: Check current step number 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | - id: get_step 31 | run: | 32 | echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT 33 | outputs: 34 | current_step: ${{ steps.get_step.outputs.current_step }} 35 | 36 | on_commit_start_markdown_image: 37 | name: On commit, start markdown, image 38 | needs: get_current_step 39 | 40 | # We will only run this action when: 41 | # 1. This repository isn't the template repository 42 | # 2. The STEP is currently 2 43 | # Reference https://docs.github.com/en/actions/learn-github-actions/contexts 44 | # Reference https://docs.github.com/en/actions/learn-github-actions/expressions 45 | if: >- 46 | ${{ !github.event.repository.is_template 47 | && needs.get_current_step.outputs.current_step == 2 }} 48 | 49 | # We'll run Ubuntu for performance instead of Mac or Windows 50 | runs-on: ubuntu-latest 51 | 52 | steps: 53 | # We'll need to check out the repository so that we can edit the README 54 | - name: Checkout 55 | uses: actions/checkout@v4 56 | with: 57 | fetch-depth: 0 # Let's get all the branches 58 | 59 | # Check that there is at least one image in the markdown file 60 | - name: Check markdown syntax, image 61 | run: ./.github/script/check-file.sh 62 | env: 63 | FILE: "index.md" 64 | SEARCH: "\\!\\[.*](.*)" 65 | 66 | # Update README to close
and open
67 | # and set STEP to '3' 68 | - name: Update to step 3 69 | uses: skills/action-update-step@v2 70 | with: 71 | token: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 72 | from_step: 2 73 | to_step: 3 74 | branch_name: start-markdown 75 | 76 | # Commits pushed by an Action will not create a new workflow run. To work 77 | # around this, create a repository_dispatch event to ensure that GitHub 78 | # Classroom's autograding workflow runs on the commit created by 79 | # skills/action-update-step. 80 | # Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow 81 | - name: Trigger autograding workflow 82 | run: | 83 | gh api \ 84 | --method POST \ 85 | -H "Accept: application/vnd.github+json" \ 86 | "/repos/${GITHUB_REPOSITORY}/dispatches" \ 87 | -f "event_type=autograde" 88 | env: 89 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 90 | -------------------------------------------------------------------------------- /.github/workflows/3-add-a-code-example.yml: -------------------------------------------------------------------------------- 1 | name: Step 3, Add a code example 2 | 3 | # This step triggers after a commit on the branch `start-markdown` 4 | # This step sets STEP to 4 5 | # This step closes
and opens
6 | 7 | # This will run every time we create push a commit to `start-markdown` 8 | # Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: 13 | - start-markdown 14 | 15 | # Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication 16 | permissions: 17 | # Need `contents: read` to checkout the repository 18 | # Need `contents: write` to update the step metadata 19 | contents: write 20 | 21 | jobs: 22 | # Get the current step from .github/script/STEP so we can 23 | # limit running the main job when the learner is on the same step. 24 | get_current_step: 25 | name: Check current step number 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | - id: get_step 31 | run: | 32 | echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT 33 | outputs: 34 | current_step: ${{ steps.get_step.outputs.current_step }} 35 | 36 | on_commit_start_markdown_code_example: 37 | name: On commit, start markdown, code example 38 | needs: get_current_step 39 | 40 | # We will only run this action when: 41 | # 1. This repository isn't the template repository 42 | # 2. The STEP is currently 3 43 | # Reference https://docs.github.com/en/actions/learn-github-actions/contexts 44 | # Reference https://docs.github.com/en/actions/learn-github-actions/expressions 45 | if: >- 46 | ${{ !github.event.repository.is_template 47 | && needs.get_current_step.outputs.current_step == 3 }} 48 | 49 | # We'll run Ubuntu for performance instead of Mac or Windows 50 | runs-on: ubuntu-latest 51 | 52 | steps: 53 | # We'll need to check out the repository so that we can edit the README 54 | - name: Checkout 55 | uses: actions/checkout@v4 56 | with: 57 | fetch-depth: 0 # Let's get all the branches 58 | 59 | # Check that there is at least one code example in the markdown file 60 | - name: Check markdown syntax, code example 61 | run: ./.github/script/check-file.sh 62 | env: 63 | FILE: "index.md" 64 | SEARCH: "\\`\\`\\`" 65 | 66 | # Update README to close
and open
67 | # and set STEP to '4' 68 | - name: Update to step 4 69 | uses: skills/action-update-step@v2 70 | with: 71 | token: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 72 | from_step: 3 73 | to_step: 4 74 | branch_name: start-markdown 75 | 76 | # Commits pushed by an Action will not create a new workflow run. To work 77 | # around this, create a repository_dispatch event to ensure that GitHub 78 | # Classroom's autograding workflow runs on the commit created by 79 | # skills/action-update-step. 80 | # Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow 81 | - name: Trigger autograding workflow 82 | run: | 83 | gh api \ 84 | --method POST \ 85 | -H "Accept: application/vnd.github+json" \ 86 | "/repos/${GITHUB_REPOSITORY}/dispatches" \ 87 | -f "event_type=autograde" 88 | env: 89 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 90 | -------------------------------------------------------------------------------- /.github/workflows/4-make-a-task-list.yml: -------------------------------------------------------------------------------- 1 | name: Step 4, Make a task list 2 | 3 | # This step triggers after a commit on the branch `start-markdown` 4 | # This step sets STEP to 5 5 | # This step closes
and opens
6 | 7 | # This will run every time we create push a commit to `start-markdown` 8 | # Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: 13 | - start-markdown 14 | 15 | # Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication 16 | permissions: 17 | # Need `contents: read` to checkout the repository 18 | # Need `contents: write` to update the step metadata 19 | contents: write 20 | 21 | jobs: 22 | # Get the current step from .github/script/STEP so we can 23 | # limit running the main job when the learner is on the same step. 24 | get_current_step: 25 | name: Check current step number 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | - id: get_step 31 | run: | 32 | echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT 33 | outputs: 34 | current_step: ${{ steps.get_step.outputs.current_step }} 35 | 36 | on_commit_start_markdown_task_list: 37 | name: On commit, start markdown, task list 38 | needs: get_current_step 39 | 40 | # We will only run this action when: 41 | # 1. This repository isn't the template repository 42 | # 2. The STEP is currently 4 43 | # Reference https://docs.github.com/en/actions/learn-github-actions/contexts 44 | # Reference https://docs.github.com/en/actions/learn-github-actions/expressions 45 | if: >- 46 | ${{ !github.event.repository.is_template 47 | && needs.get_current_step.outputs.current_step == 4 }} 48 | 49 | # We'll run Ubuntu for performance instead of Mac or Windows 50 | runs-on: ubuntu-latest 51 | 52 | steps: 53 | # We'll need to check out the repository so that we can edit the README 54 | - name: Checkout 55 | uses: actions/checkout@v4 56 | with: 57 | fetch-depth: 0 # Let's get all the branches 58 | 59 | # Make sure there is at least one task list item in the file 60 | - name: Check markdown syntax, task list 61 | run: ./.github/script/check-file.sh 62 | env: 63 | FILE: "index.md" 64 | SEARCH: "\\- \\[ ] " 65 | 66 | # Update README to close
and open
67 | # and set STEP to '5' 68 | - name: Update to step 5 69 | uses: skills/action-update-step@v2 70 | with: 71 | token: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 72 | from_step: 4 73 | to_step: 5 74 | branch_name: start-markdown 75 | 76 | # Commits pushed by an Action will not create a new workflow run. To work 77 | # around this, create a repository_dispatch event to ensure that GitHub 78 | # Classroom's autograding workflow runs on the commit created by 79 | # skills/action-update-step. 80 | # Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow 81 | - name: Trigger autograding workflow 82 | run: | 83 | gh api \ 84 | --method POST \ 85 | -H "Accept: application/vnd.github+json" \ 86 | "/repos/${GITHUB_REPOSITORY}/dispatches" \ 87 | -f "event_type=autograde" 88 | env: 89 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 90 | -------------------------------------------------------------------------------- /.github/workflows/5-merge-your-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Step 5, Merge your pull request 2 | 3 | # This step triggers after a pull requst is merged to `main` 4 | # This step sets STEP to X 5 | # This step closes
and opens
6 | 7 | # This will run every time we create push a commit to `main` 8 | # Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows 9 | on: 10 | workflow_dispatch: 11 | push: 12 | branches: 13 | - main 14 | 15 | # Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication 16 | permissions: 17 | # Need `contents: read` to checkout the repository 18 | # Need `contents: write` to update the step metadata 19 | contents: write 20 | 21 | jobs: 22 | # Get the current step from .github/script/STEP so we can 23 | # limit running the main job when the learner is on the same step. 24 | get_current_step: 25 | name: Check current step number 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v4 30 | - id: get_step 31 | run: | 32 | echo "current_step=$(cat ./.github/script/STEP)" >> $GITHUB_OUTPUT 33 | outputs: 34 | current_step: ${{ steps.get_step.outputs.current_step }} 35 | 36 | on_merge: 37 | name: On merge 38 | needs: get_current_step 39 | 40 | # We will only run this action when: 41 | # 1. This repository isn't the template repository 42 | # 2. The STEP is currently 5 43 | # Reference https://docs.github.com/en/actions/learn-github-actions/contexts 44 | # Reference https://docs.github.com/en/actions/learn-github-actions/expressions 45 | if: >- 46 | ${{ !github.event.repository.is_template 47 | && needs.get_current_step.outputs.current_step == 5 }} 48 | 49 | # We'll run Ubuntu for performance instead of Mac or Windows 50 | runs-on: ubuntu-latest 51 | 52 | steps: 53 | # We'll need to check out the repository so that we can edit the README 54 | - name: Checkout 55 | uses: actions/checkout@v4 56 | with: 57 | fetch-depth: 0 # Let's get all the branches 58 | 59 | # Update README to close
and open
60 | # and set STEP to 'X' 61 | - name: Update to step X 62 | uses: skills/action-update-step@v2 63 | with: 64 | token: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }} 65 | from_step: 5 66 | to_step: X 67 | branch_name: start-markdown 68 | 69 | # Commits pushed by an Action will not create a new workflow run. To work 70 | # around this, create a repository_dispatch event to ensure that GitHub 71 | # Classroom's autograding workflow runs on the commit created by 72 | # skills/action-update-step. 73 | # Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow 74 | - name: Trigger autograding workflow 75 | run: | 76 | gh api \ 77 | --method POST \ 78 | -H "Accept: application/vnd.github+json" \ 79 | "/repos/${GITHUB_REPOSITORY}/dispatches" \ 80 | -f "event_type=autograde" 81 | env: 82 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 83 | -------------------------------------------------------------------------------- /.github/workflows/classroom.yml: -------------------------------------------------------------------------------- 1 | name: Autograding Tests 2 | 'on': 3 | - workflow_dispatch 4 | - repository_dispatch 5 | permissions: 6 | checks: write 7 | actions: read 8 | contents: read 9 | jobs: 10 | run-autograding-tests: 11 | runs-on: ubuntu-latest 12 | if: github.actor != 'github-classroom[bot]' 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v4 16 | - name: Step 1 Add Headers 17 | id: step-1-add-headers 18 | uses: classroom-resources/autograding-command-grader@v1 19 | with: 20 | test-name: Step 1 Add Headers 21 | setup-command: sleep 20 22 | command: "[ $(cat .github/script/STEP) -ge 1 ] || [ $(cat .github/script/STEP) 23 | = X ]" 24 | timeout: 10 25 | max-score: 1 26 | - name: Step 2 Add an image 27 | id: step-2-add-an-image 28 | uses: classroom-resources/autograding-command-grader@v1 29 | with: 30 | test-name: Step 2 Add an image 31 | setup-command: sleep 20 32 | command: "[ $(cat .github/script/STEP) -ge 2 ] || [ $(cat .github/script/STEP) 33 | = X ]" 34 | timeout: 10 35 | max-score: 1 36 | - name: Step 3 Add a code example 37 | id: step-3-add-a-code-example 38 | uses: classroom-resources/autograding-command-grader@v1 39 | with: 40 | test-name: Step 3 Add a code example 41 | setup-command: sleep 20 42 | command: "[ $(cat .github/script/STEP) -ge 3 ] || [ $(cat .github/script/STEP) 43 | = X ]" 44 | timeout: 10 45 | max-score: 1 46 | - name: Step 4 Make a task list 47 | id: step-4-make-a-task-list 48 | uses: classroom-resources/autograding-command-grader@v1 49 | with: 50 | test-name: Step 4 Make a task list 51 | setup-command: sleep 20 52 | command: "[ $(cat .github/script/STEP) -ge 4 ] || [ $(cat .github/script/STEP) 53 | = X ]" 54 | timeout: 10 55 | max-score: 1 56 | - name: Step 5 Merge your pull request 57 | id: step-5-merge-your-pull-request 58 | uses: classroom-resources/autograding-command-grader@v1 59 | with: 60 | test-name: Step 5 Merge your pull request 61 | setup-command: sleep 20 62 | command: "[ $(cat .github/script/STEP) -ge 5 ] || [ $(cat .github/script/STEP) 63 | = X ]" 64 | timeout: 10 65 | max-score: 1 66 | - name: Autograding Reporter 67 | uses: classroom-resources/autograding-grading-reporter@v1 68 | env: 69 | STEP-1-ADD-HEADERS_RESULTS: "${{steps.step-1-add-headers.outputs.result}}" 70 | STEP-2-ADD-AN-IMAGE_RESULTS: "${{steps.step-2-add-an-image.outputs.result}}" 71 | STEP-3-ADD-A-CODE-EXAMPLE_RESULTS: "${{steps.step-3-add-a-code-example.outputs.result}}" 72 | STEP-4-MAKE-A-TASK-LIST_RESULTS: "${{steps.step-4-make-a-task-list.outputs.result}}" 73 | STEP-5-MERGE-YOUR-PULL-REQUEST_RESULTS: "${{steps.step-5-merge-your-pull-request.outputs.result}}" 74 | with: 75 | runners: step-1-add-headers,step-2-add-an-image,step-3-add-a-code-example,step-4-make-a-task-list,step-5-merge-your-pull-request 76 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store 32 | .DS_Store? 33 | ._* 34 | .Spotlight-V100 35 | .Trashes 36 | ehthumbs.db 37 | Thumbs.db 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) GitHub, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Markdown Beginner Guide 📘 2 | 3 | ## Introduction 🚀 4 | GitHub Markdown is a lightweight and easy-to-use syntax for styling your writing on GitHub. This guide will introduce you to the basics of Markdown so you can start documenting your projects like a pro! 5 | 6 | ## Basic Syntax 📝 7 | 8 | ### Headings 🏷️ 9 | Create headings by starting a line with `#`. Add more `#` for subheadings: 10 | 11 | ```markdown 12 | # This is an H1 13 | ## This is an H2 14 | ### This is an H3 15 | ``` 16 | 17 | ### Emphasis ✨ 18 | Add **bold** or *italic* text: 19 | 20 | ```markdown 21 | **This text is bold** 22 | *This text is italic* 23 | ``` 24 | 25 | ### Lists 📋 26 | - **Unordered lists:** Use `-`, `+`, or `*`: 27 | 28 | ```markdown 29 | - Item 1 30 | - Item 2 31 | - Subitem 1 32 | - Subitem 2 33 | ``` 34 | 35 | - **Ordered lists:** Use numbers: 36 | 37 | ```markdown 38 | 1. Item 1 39 | 2. Item 2 40 | 1. Subitem 1 41 | 2. Subitem 2 42 | ``` 43 | 44 | ### Links 🔗 45 | Create links by wrapping the link text in `[ ]` and the URL in `( )`: 46 | 47 | ```markdown 48 | [GitHub](https://github.com) 49 | ``` 50 | 51 | ### Images 🖼️ 52 | Add images similarly to links, but start with `!`: 53 | 54 | ```markdown 55 | ![GitHub Logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png) 56 | ``` 57 | 58 | ### Blockquotes 💬 59 | Create blockquotes using `>`: 60 | 61 | ```markdown 62 | > This is a blockquote 63 | ``` 64 | 65 | ### Code ⌨️ 66 | Inline code uses backticks: 67 | 68 | ```markdown 69 | `inline code` 70 | ``` 71 | 72 | Code blocks use triple backticks: 73 | 74 | ``` 75 | code block 76 | ``` 77 | 78 | ## Advanced Syntax 🚀✨ 79 | 80 | ### Tables 📊 81 | Create tables using `|` to separate columns and `-` to separate the header row from the data rows: 82 | 83 | ```markdown 84 | | Header 1 | Header 2 | 85 | | -------- | -------- | 86 | | Row 1 | Data 1 | 87 | | Row 2 | Data 2 | 88 | ``` 89 | 90 | ### Task Lists ✅ 91 | Create task lists using `- [ ]` for unchecked items and `- [x]` for checked items: 92 | 93 | ```markdown 94 | - [x] Task 1 95 | - [ ] Task 2 96 | - [ ] Task 3 97 | ``` 98 | 99 | ### Strikethrough ❌ 100 | Strikethrough text using `~~`: 101 | 102 | ```markdown 103 | ~~This was a mistake~~ 104 | ``` 105 | 106 | ### Emojis 😄 107 | Add emojis using `:emoji_name:`: 108 | 109 | ```markdown 110 | :smile: :rocket: :tada: 111 | ``` 112 | 113 | ## Conclusion 🎉 114 | With this guide, you should have a solid foundation in GitHub Markdown. Happy documenting! 🥳 115 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | # This is the HEADER 2 | 3 | ## This is the Image 4 | ![Image](https://cdn.leonardo.ai/users/79ee5248-17e1-4625-adb0-721dc26a5030/generations/333b396f-a9f7-4585-8459-854ecb90f093/Default_midshot_celshading_style13_centered_image_ultra_detail_3.jpg) 5 | 6 | ## This is the code 7 | ``` 8 | $ git init 9 | Initialized empty Git repository in /Users/skills/Projects/recipe-repository/.git/ 10 | ``` 11 | 12 | ## This is the Task list 13 | 14 | - [ ] Productive box is required in README 15 | - [x] Add social card to Leetcode 16 | - [ ] Don't know anything about this item 17 | --------------------------------------------------------------------------------