GitHub Action
refs/heads/ci-cd/hugging-face
8b414b0
name: kaggle-submission
on:
pull_request:
branches:
- main
types: [closed]
jobs:
kaggle-api:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7.13
uses: actions/setup-python@v2
with:
python-version: 3.7.13
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry lock
poetry --no-root install
- name: Authenticate to Kaggle
run: |
mkdir ~/.kaggle
echo ${{ secrets.KAGGLE }} >> ~/.kaggle/kaggle.json
- name: Push kernel
run: poetry run kaggle kernels push -p src/
- name: Update weights
run: poetry run kaggle datasets version -p data/weights --dir-mode zip -m ${{ github.ref }}