Skip to content

Commit f91cbc2

Browse files
authored
Created kaggle-dataset.yml
1 parent ec86c30 commit f91cbc2

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Fetch and Push Kaggle Dataset
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 0 * * 0' # Runs every Sunday at midnight UTC
9+
10+
jobs:
11+
download-dataset:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
17+
- name: Install Kaggle CLI
18+
run: pip install kaggle
19+
20+
- name: Set Up Kaggle API Key
21+
run: |
22+
mkdir -p ~/.kaggle
23+
echo "${{ secrets.KAGGLE_API_KEY }}" > ~/.kaggle/kaggle.json
24+
chmod 600 ~/.kaggle/kaggle.json
25+
26+
- name: Download Dataset from Kaggle
27+
run: kaggle datasets download -d ieee-fraud-detection/ieee-fraud-detection --unzip -p dataset/
28+
29+
- name: Commit and Push Dataset to GitHub
30+
run: |
31+
git config --global user.name "github-actions"
32+
git config --global user.email "[email protected]"
33+
git add dataset/
34+
git commit -m "Auto-update IEEE-CIS Fraud Detection dataset"
35+
git push

0 commit comments

Comments
 (0)