Hourly leaderboard update #31500
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
# This is a basic workflow to help you get started with Actions | |
name: Hourly leaderboard update | |
# Controls when the action will run. | |
on: | |
schedule: | |
# Every hour, 1 minute past the hour. | |
- cron: "1 * * * *" | |
# 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" | |
update: | |
# 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 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
# Setup Python | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Update leaderboards | |
run: | | |
pip install "git+https://github.com/aws-deepracer-community/[email protected]" | |
drs leaderboard-update -o raw_data | |
- name: Commit leaderboards | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add ./raw_data | |
git commit -m "Leaderboard update" || echo "No changes to commit" | |
- name: Update documentation | |
run: | | |
pip install -r requirements.txt | |
python ./scripts/documentation.py | |
- name: Commit documentation | |
run: | | |
git add ./raw_data | |
git commit -m "Documentation update" || echo "No changes to commit" | |
git push |