Skip to content

Fetch Hetzner Auction data #3589

Fetch Hetzner Auction data

Fetch Hetzner Auction data #3589

Workflow file for this run

name: Fetch Hetzner Auction data
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "13 * * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout data branch
run: git fetch origin data --depth 1 && git checkout data
- name: Install jq
uses: dcarbone/install-jq-action@v3.0.1
- name: Fetch Hetzner Serverboerse Data
run: curl 'https://www.hetzner.com/_resources/app/data/app/live_data_sb_EUR.json' | jq .server | gzip > sb-$(date -u +%H%M%S).json.gz
- name: Partition files
run: mkdir -p $(date -u +%Y%m%d) && mv sb-*.json.gz $(date -u +%Y%m%d)
- name: Purge old files
run: git show main:scripts/purge.py | python3 - -- .
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
- name: Trigger site deployment
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Update Database and Push