2022-04-24 08:34:50 +00:00
|
|
|
name: Update Data
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
# Run this on Sundays because NSDL won't add new things then
|
|
|
|
schedule:
|
|
|
|
# 8:07 UTC every Sunday
|
|
|
|
# 13:37 IST every Sunday
|
|
|
|
- cron: '7 8 * * 0'
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
name: Update data
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2022-04-24 08:51:29 +00:00
|
|
|
- name: Get current date
|
|
|
|
uses: josStorer/get-current-time@v2
|
|
|
|
id: current-time
|
|
|
|
with:
|
|
|
|
# Versioning is current date
|
|
|
|
format: "YYYY.M.D"
|
2022-04-24 08:34:50 +00:00
|
|
|
- name: Update data
|
|
|
|
run: ./fetch.sh
|
2022-04-25 07:08:09 +00:00
|
|
|
# Only tag if we're running on the scheduled job
|
2022-04-24 08:34:50 +00:00
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
2022-04-25 07:08:09 +00:00
|
|
|
if: ${{ github.event_name == 'schedule' }}
|
2022-04-24 08:34:50 +00:00
|
|
|
with:
|
|
|
|
commit_message: Update ISIN Data
|
|
|
|
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
|
2022-04-24 08:51:29 +00:00
|
|
|
file_pattern: "*.csv"
|
|
|
|
status_options: '--untracked-files=no'
|
|
|
|
tagging_message: "v${{ steps.current-time.outputs.formattedTime }}"
|
2022-04-25 07:08:09 +00:00
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
with:
|
|
|
|
commit_message: Update ISIN Data
|
|
|
|
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
|
|
|
|
file_pattern: "*.csv"
|
|
|
|
status_options: '--untracked-files=no'
|