-
-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (35 loc) · 1.06 KB
/
update.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
name: Update Data
on:
workflow_dispatch:
push:
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: Update data
run: make update
id: update_data
# Only tag if we're running on the scheduled job
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
with:
commit_message: Update ISIN Data
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
file_pattern: "ISIN.csv"
status_options: '--untracked-files=no'
tagging_message: "v${{ steps.update_data.outputs.version }}"
- name: Create Release
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: |
pip install -r src/requirements.txt
make release "version=v${{ steps.update_data.outputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}