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

32 lines
1.1 KiB
YAML

name: Update Data
on:
schedule:
# 18:07 UTC every day
# 23:37 IST every day
- cron: '7 18 * * *'
jobs:
update:
name: Update data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Get current date
uses: josStorer/get-current-time@v2
id: current-time
with:
# Versioning is current date
format: "YYYY.M.D"
- name: Update data
run: ./fetch.sh "${{ steps.current-time.outputs.formattedTime }}"
# Only tag if we're running on the scheduled job
- 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>'
file_pattern: "*.csv"
status_options: '--untracked-files=no'
tagging_message: "v${{ steps.current-time.outputs.formattedTime }}"
- name: Create Release
run: gh release create "v${{ steps.current-time.outputs.formattedTime }}" --notes "v${{steps.current-time.outputs.formattedTime}}" *.csv && \