Skip to content

Mise à jour GTFS

Mise à jour GTFS #8

Workflow file for this run

name: Mise à jour GTFS
on:
workflow_dispatch:
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: Checkout and create latest-data branch
run: git checkout -b latest-data
- name: Generate GTFS
run: node src/index.js
- id: vars
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_title=Latest data: ${timestamp}" >> $GITHUB_OUTPUT
echo "pr_body=Les données ont été mises à jour!" >> $GITHUB_OUTPUT
git diff --name-status
git add -A
git commit -m "Latest data: ${timestamp}" || exit 0
# git push
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
branch: main
delete-branch: true