Skip to content
upload

GitHub Action

Push Kaggle Kernel

v1.0.0 Latest version

Push Kaggle Kernel

upload

Push Kaggle Kernel

Push Keggle Kernel

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Push Kaggle Kernel

uses: harupy/push-kaggle-kernel@v1.0.0

Learn more about this action in harupy/push-kaggle-kernel

Choose a version

Push Kaggle Kernel

A GitHub Action to push Kaggle kernels.

Usage

  1. Add KAGGLE_USERNAME and KAGGLE_KEY as secrets in your repository.
  2. Define your workflow.

Example

name: Upload

on:
  push:
    branches:
      - master

jobs:
  upload:
    name: Upload
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Create a toy python script
        run: |
          echo "print('hello world')" > script.py

      - uses: harupy/push-kaggle-kernel@master
        env:
          # Do not leak your credentials.
          KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
          KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
        with:
          id: ${{ secrets.KAGGLE_USERNAME }}/${{ github.sha }}
          title: ${{ github.sha }}
          code_file: ./script.py
          language: python
          kernel_type: script
          # Do not share high-scoring kernels.
          is_private: false
          competition_sources: |
            titanic

Inputs

Name Description Required Default Options
id ID of kernel (must have the format: {username}/{slug}). true -
title Title of kernel (must be at least five characters). true -
code_file Path to kernel to push (relative from the repo root). true -
language Language that kernel is written in. true - ["python", "r", "rmarkdown"]
kernel_type Type of kernel. true - ["script", "notebook"]
is_private Whether or not kernel should be private. false "true" ["true", "false"]
enable_gpu Whether or not kernel should run on a GPU. false "false" ["true", "false"]
enable_internet Whether or not kernel should be able to access the internet. false "false" ["true", "false"]
dataset_sources A list of data sources that kernel should use. false ""
competition_sources A list of competition data sources that kernel should use. false ""
kernel_sources A list of kernel data sources that kernel should use. false ""