build and publish on opendata.bbnavi.de #419
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: build and publish on opendata.bbnavi.de | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
# every day at 2:40 | |
- cron: '40 2 * * *' | |
jobs: | |
# todo: DRY with build.yml | |
build: | |
name: build GTFS-Flex feed | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: install qsv | |
run: ./ci/install-qsv.sh | |
- run: ./build.sh | |
- name: store gtfs-flex.zip as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gtfs-flex | |
path: | | |
index.html | |
gtfs-flex.zip | |
retention-days: 1 | |
publish: | |
name: publish feed on opendata.bbnavi.de | |
needs: [build] | |
runs-on: ubuntu-latest | |
env: | |
MC_IMAGE: | |
steps: | |
# todo | |
- name: restore gtfs-flex.zip | |
uses: actions/download-artifact@v4 | |
with: | |
name: gtfs-flex | |
- name: publish to opendata.bbnavi.de | |
run: | | |
docker run \ | |
--rm -i -v $PWD:/data \ | |
-e "MC_HOST_bbnavi=https://${{ secrets.OPENDATA_KEY }}:${{ secrets.OPENDATA_SECRET }}@opendata.bbnavi.de" \ | |
minio/mc:RELEASE.2023-09-02T21-28-03Z \ | |
cp /data/index.html /data/gtfs-flex.zip bbnavi/vbb-gtfs-flex/ |