Skip to content

Update the Maelstrom Statistics Spreadsheet #48

Update the Maelstrom Statistics Spreadsheet

Update the Maelstrom Statistics Spreadsheet #48

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"