Skip to content

Update Map Every 12 Hours #334

Update Map Every 12 Hours

Update Map Every 12 Hours #334

Workflow file for this run

# .github/workflows/update_map.yml
name: Update Map Every 12 Hours
on:
workflow_dispatch: # Allow manual trigger
schedule:
# Cron syntax, '0 * * * *' means run at the 0th minute of every hour
# https://crontab.guru/every-hour
- cron: '0 */12 * * *'
jobs:
build-and-commit:
runs-on: ubuntu-latest # Use the latest Ubuntu virtual machine environment
permissions:
contents: write
steps:
# Step 1: Check out your repository code
- name: Check out repo
uses: actions/checkout@v4
# Step 2: Set up uv environment
- name: Install uv
uses: astral-sh/setup-uv@v5
# Step 3: Run your Python script to generate the map
- name: Generate map
run: uvx --refresh --from git+https://github.com/ucam-eo/geotessera@main geotessera coverage
- name: Make HTML
run: mv globe.html index.html && mv tessera_coverage.png map.png
# Step 5: Commit the updated map file
# We use an existing action to simplify the commit operation
- name: Commit and push if it changed
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'CI: Auto-update map' # Commit message
commit_user_name: 'GitHub Actions Bot' # Committer name
commit_user_email: 'actions@github.com' # Committer email
commit_author: 'GitHub Actions Bot <actions@github.com>'