Update the Maelstrom Statistics Spreadsheet #66
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: Update the Maelstrom Statistics Spreadsheet | |
on: | |
schedule: | |
- cron: '0 7 * * *' | |
workflow_dispatch: | |
jobs: | |
update_stats_spreadsheet: | |
name: Update the Maelstrom Statistics Spreadsheet | |
permissions: read-all | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Get Repository from Git | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Set up Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
# For some reason, GitHub provides Rust for us. The problem is that, when | |
# executing the recursive cargo invocation, the cargo in ~/.cargo/bin ends | |
# up prepended to PATH, which then causes problems. | |
- name: Remove Rust provided by GitHub. | |
run: rm -rf ~/.cargo ~/.rustup | |
- name: Update the Spreadsheet | |
env: | |
SERVICE_ACCOUNT_JSON: ${{ secrets.GSHEET_SERVICE_ACCOUNT }} | |
GH_TOKEN: ${{ secrets.ADMIN_READ_GH_TOKEN }} | |
run: | | |
scripts/update-stats-spreadsheet.sh "$SERVICE_ACCOUNT_JSON" "$GH_TOKEN" |