Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger autograding with repository_dispatch after incrementing steps #9

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}