Skip to content

Mise à jour GTFS

Mise à jour GTFS #20

Workflow file for this run

name: Mise à jour GTFS
on:
workflow_dispatch:
schedule:
- cron: "30 14 * * 1,3,5" # Runs on Monday, Wednesday and Friday at 14:30 UTC
jobs:
gtfs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "20"
- name: Prepare node
run: |-
npm install
npm run prepare
- name: Generate GTFS
run: node src/index.js
- id: vars
name: Set variables for pull request
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
timestamp=$(date -u)
# Set title and body for PR
echo "pr_timestamp=${timestamp}" >> $GITHUB_OUTPUT
echo "pr_title=Latest data: ${timestamp}" >> $GITHUB_OUTPUT
echo "pr_body=Les données ont été mises à jour!" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Latest data ${{steps.vars.outputs.pr_timestamp}}
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
branch: latest-gtfs
delete-branch: true