india-isin-data/.github/workflows/update.yml

32 lines
1.1 KiB
YAML
Raw Normal View History

2022-04-24 08:34:50 +00:00
name: Update Data
on:
schedule:
2022-04-28 05:53:33 +00:00
# 18:07 UTC every day
# 23:37 IST every day
- cron: '7 18 * * *'
2022-04-24 08:34:50 +00:00
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
2022-04-30 11:24:25 +00:00
run: ./fetch.sh "${{ steps.current-time.outputs.formattedTime }}"
# 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
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 }}"
- name: Create Release
2022-04-30 19:28:03 +00:00
run: gh release create "v${{ steps.current-time.outputs.formattedTime }}" --notes "v${{steps.current-time.outputs.formattedTime}}" *.csv && \