Test #13
Workflow file for this run
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
name: Autograding Tests | |
'on': | |
push: | |
branches: | |
- '*' | |
- '!badges' | |
workflow_dispatch: | |
repository_dispatch: | |
permissions: | |
checks: write | |
actions: read | |
contents: read | |
jobs: | |
run-autograding-tests: | |
runs-on: ubuntu-latest | |
if: github.actor != 'github-classroom[bot]' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Set Locale | |
run: | | |
sudo apt-get update && sudo apt-get install tzdata locales -y | |
sudo locale-gen ru_RU.UTF-8 | |
sudo locale-gen ru_RU | |
locale -a | |
# add id to action so outputs can be used | |
- uses: education/autograding@v1 | |
id: autograder | |
continue-on-error: true | |
# switch to badges branch | |
- run: git checkout badges || git checkout -b badges | |
# create points bar | |
- name: points bar | |
uses: markpatterson27/points-bar@v1 | |
with: | |
points: ${{ steps.autograder.outputs.points }} | |
path: '.github/badges/points-bar.svg' | |
# commit and push badges if badges have changed | |
- name: Commit changes to points bar | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add '.github/badges/points-bar.svg' | |
git commit -m "Add/Update points bar" || exit 0 | |
git push origin badges |