Skip to content

.github/workflows/score.yml #928

.github/workflows/score.yml

.github/workflows/score.yml #928

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
schedule:
- cron: '0 6 * * *'
push:
branches:
- main
workflow_dispatch:
name: score
jobs:
build:
# Skip CI if [ci skip] in the commit message
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and config file
run: |
pip install -r requirements.txt
echo "$SHEET_KEY" > config.json
env:
SHEET_KEY: ${{secrets.SHEET_KEY}}
- name: score
run: |
./run.sh 2>&1 | tee score_log.txt
- name: upload
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add leaderboard.csv
git add score_log.txt
git add repo_urls.txt
git add nonscored_submissions.txt || :
git commit -m 'new scores' || echo "No changes to commit"
git push origin || echo "No changes to commit"