-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.85 KB
/
python-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Update Calendar Dates
# calendar_dates.txt is auto-generated at 12am every Wednesday morning and should be on the FTP server by 12:30am
# '0 11 * * WED' schedules the GitHub Action to run at 11:00 UTC (3am PTC) every Wednesday morning
# use '*/5 * * * *' for testing (GitHub Actions can be scheduled to run every 5 minutes)
# switch from scheduled to manual runs
# Uncomment below for auto runs:
on:
schedule:
- cron: '0 11 * * WED'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M')"
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytz
pip install PyRSS2Gen
pip install requests
pip install python-dateutil
- name: Update weekly calendar_dates.txt
run: python update_gtfs.py
env:
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASS: ${{ secrets.FTP_PASS }}
SERVER: ${{ secrets.SERVER }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
- uses: EndBug/add-and-commit@v7
with:
message: Auto Updated on ${{ steps.date.outputs.date }}
committer_name: GitHub Actions
committer_email: [email protected]