Skip to content

Check files affected by task contribution Pull Requests (#2644) #1544

Check files affected by task contribution Pull Requests (#2644)

Check files affected by task contribution Pull Requests (#2644) #1544

# 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:
- "2024"
# 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/[email protected]
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