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
|
2022-05-02 06:17:15 +00:00
|
|
|
- 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 }}
|
|
|
|
- name: Update data
|
2022-05-02 04:21:41 +00:00
|
|
|
run: make all
|
|
|
|
id: update_data
|
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
|
|
|
|
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'
|
2022-05-02 04:21:41 +00:00
|
|
|
tagging_message: "v${{ steps.update_data.outputs.version }}"
|
2022-04-30 10:40:42 +00:00
|
|
|
- name: Create Release
|
2022-05-07 05:01:30 +00:00
|
|
|
run: |
|
|
|
|
git diff --ignore-all-space -U0 HEAD^ *.csv|egrep -oe '^([+-]IN\w{10})' > /tmp/release.txt
|
|
|
|
echo "$(cat /tmp/release.txt | wc -l) Changes" > /tmp/release.md
|
|
|
|
echo '```diff' >> /tmp/release.md
|
|
|
|
cat /tmp/release.txt >> /tmp/release.md
|
|
|
|
echo '```' >> /tmp/release.md
|
|
|
|
gh release create "v${{ steps.update_data.outputs.version }}" --notes-file /tmp/release.md *.csv
|
2022-05-04 19:38:01 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|