-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub action that automatically counts task registrations (#918)
- Loading branch information
1 parent
c7e2b45
commit 97404c9
Showing
3 changed files
with
117 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Statistic Information for Each Assignment Category | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the 2021 branch | ||
push: | ||
branches: | ||
- "2021" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
count-assignments: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# Setup Python | ||
- name: Setup Python | ||
uses: actions/setup-python@v2.2.1 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f ./tools/requirements.txt ]; then pip install -r ./tools/requirements.txt; fi | ||
# Set timezone to Europe/Stockholm | ||
- name: Set timezone | ||
run: sudo timedatectl set-timezone Europe/Stockholm | ||
|
||
# Runs a single command using the runners shell | ||
- name: Update the statistic issue | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REPO_FULLNAME: ${{ github.repository }} | ||
CONTRIBUTIONS_PATH: ${{ secrets.ASSIGNMENT_STAT_CONTRIBUTIONS_PATH }} | ||
ISSUE_NUMBER: ${{ secrets.ASSIGNMENT_STAT_ISSUE_NUMBER }} | ||
run: python ./tools/stat_submissions.py -p $CONTRIBUTIONS_PATH --printInMarkdown --printStudentStat --publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
PTable | ||
PyGithub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters