Skip to content

Commit

Permalink
Merge pull request #9 from Exp-Communicate-Using-Markdown-Cohort-1/tr…
Browse files Browse the repository at this point in the history
…igger-autograding

Trigger autograding with repository_dispatch after incrementing steps
  • Loading branch information
smashwilson committed May 29, 2024
2 parents ae29e6f + 31474df commit 3ac8c6c
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/0-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,18 @@ jobs:
branch_name: start-markdown
env:
GITHUB_TOKEN: ${{ secrets.GLOBAL_CLASSROOM_ORG_TOKEN }}

# Commits pushed by an Action will not create a new workflow run. To work
# around this, create a repository_dispatch event to ensure that GitHub
# Classroom's autograding workflow runs on the commit created by
# skills/action-update-step.
# Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger autograding workflow
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/dispatches" \
-f "event_type=autograde"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/1-add-headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,18 @@ jobs:
from_step: 1
to_step: 2
branch_name: start-markdown

# Commits pushed by an Action will not create a new workflow run. To work
# around this, create a repository_dispatch event to ensure that GitHub
# Classroom's autograding workflow runs on the commit created by
# skills/action-update-step.
# Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger autograding workflow
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/dispatches" \
-f "event_type=autograde"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/2-add-an-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,18 @@ jobs:
from_step: 2
to_step: 3
branch_name: start-markdown

# Commits pushed by an Action will not create a new workflow run. To work
# around this, create a repository_dispatch event to ensure that GitHub
# Classroom's autograding workflow runs on the commit created by
# skills/action-update-step.
# Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger autograding workflow
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/dispatches" \
-f "event_type=autograde"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/3-add-a-code-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,18 @@ jobs:
from_step: 3
to_step: 4
branch_name: start-markdown

# Commits pushed by an Action will not create a new workflow run. To work
# around this, create a repository_dispatch event to ensure that GitHub
# Classroom's autograding workflow runs on the commit created by
# skills/action-update-step.
# Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger autograding workflow
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/dispatches" \
-f "event_type=autograde"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/4-make-a-task-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,18 @@ jobs:
from_step: 4
to_step: 5
branch_name: start-markdown

# Commits pushed by an Action will not create a new workflow run. To work
# around this, create a repository_dispatch event to ensure that GitHub
# Classroom's autograding workflow runs on the commit created by
# skills/action-update-step.
# Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger autograding workflow
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/dispatches" \
-f "event_type=autograde"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/5-merge-your-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,18 @@ jobs:
from_step: 5
to_step: X
branch_name: start-markdown

# Commits pushed by an Action will not create a new workflow run. To work
# around this, create a repository_dispatch event to ensure that GitHub
# Classroom's autograding workflow runs on the commit created by
# skills/action-update-step.
# Reference: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
- name: Trigger autograding workflow
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/dispatches" \
-f "event_type=autograde"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3ac8c6c

Please sign in to comment.