Skip to content

Publish Current Export #78

Publish Current Export

Publish Current Export #78

Workflow file for this run

name: Publish Current Export
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1'
jobs:
export:
runs-on: ubuntu-latest
steps:
- name: Store Current Date
id: date
run: echo "DATE=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Checkout Data Repository
uses: actions/checkout@v4
- name: Configure `git`
run: |
git config user.name htv-bot
git config user.email mail@howtheyvote.eu
- name: Create new Commit and tag it
env:
DATE: ${{ steps.date.outputs.DATE }}
run: |
git commit --allow-empty -m "Export from $DATE"
git push
git tag "$DATE"
git push origin tag "$DATE"
- name: Download current export
run: |
wget https://howtheyvote.eu/files/export/export.zip
unzip -o -d export export.zip
gzip export/*.csv
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.date.outputs.DATE }}
body_path: ./export/README.md
files: |
export.zip
export/*.csv.gz
export/last_updated.txt