Update kaggle-dataset.yml #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fetch and Push Kaggle Dataset | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 0 * * 0' # Runs every Sunday at midnight UTC | |
| jobs: | |
| download-dataset: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Install Kaggle CLI | |
| run: pip install kaggle | |
| - name: Set Up Kaggle API Key | |
| run: | | |
| mkdir -p ~/.kaggle | |
| echo "${{ secrets.KAGGLE_API_KEY }}" > ~/.kaggle/kaggle.json | |
| chmod 600 ~/.kaggle/kaggle.json | |
| - name: Download Dataset from Kaggle Competition | |
| run: kaggle competitions download -c ieee-fraud-detection --unzip -p dataset/ | |
| - name: Commit and Push Dataset to GitHub | |
| run: | | |
| git config --global user.name "krish17Nov" | |
| git config --global user.email "[email protected]" | |
| git add dataset/ | |
| git commit -m "Auto-update IEEE-CIS Fraud Detection dataset" | |
| git push |