Create a PR on new GTFS release #49
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
on: | |
schedule: | |
- cron: "0 0 * * 0" | |
workflow_dispatch: | |
name: Create a PR on new GTFS release | |
jobs: | |
check-gtfs-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: "true" | |
- name: release-downloader | |
id: gtfs-release | |
uses: robinraju/release-downloader@v1.7 | |
with: | |
repository: septadev/GTFS | |
latest: true | |
fileName: gtfs_public.zip | |
- name: Unzip artifacts and copy | |
run: | | |
unzip gtfs_public.zip | |
mv google_bus.zip ${{ github.workspace }}/tests/gtfs_data/septa_bus.zip | |
mv google_rail.zip ${{ github.workspace }}/tests/gtfs_data/septa_rail.zip | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
add-paths: | | |
tests/gtfs_data/septa_bus.zip | |
tests/gtfs_data/septa_rail.zip | |
title: GTFS Data Update to ${{steps.gtfs-release.outputs.tag_name}} | |
body: Update SEPTA GTFS to ${{steps.gtfs-release.outputs.tag_name}} | |
commit-message: Update SEPTA GTFS to ${{steps.gtfs-release.outputs.tag_name}} | |
branch: gtfs-update-to-${{steps.gtfs-release.outputs.tag_name}} | |
delete-branch: true | |
token: ${{ secrets.PAT_TOKEN }} |