Skip to content

A cookiecutter template for generating GitHub actions running Python

License

Notifications You must be signed in to change notification settings

browniebroke/cookiecutter-action-py

Repository files navigation

Cookiecutter Python Action

CI Status pre-commit.ci status Ruff cookiecutter

A cookiecutter template for generating Github actions running Python

Features

Quick start

Pre-requisites

Make sure that you have the cookiecutter command line interface installed:

cookiecutter --version

If this is not the case, install it first. Check out their documentation for the most up to date info for your platform.

Usage

To create a project for a Python powered Github action:

> cookiecutter https://github.com/browniebroke/cookiecutter-action-py
author_name [Bruno Alla]:
email [alla.brunoo@gmail.com]:
github_username [browniebroke]:
name [Github Action Python]:
hyphenated_name [github-action-python]:
description [A Github Action to run some Python code]:
Select branding_color:
1 - white
2 - yellow
3 - blue
4 - green
5 - orange
6 - red
7 - purple
8 - gray-dark
Choose from 1, 2, 3, 4, 5, 6, 7, 8 [1]:

The generated project will live in a directory named after the answer you gave for the hyphenated_name, this should match your Github repo name.

Next steps

  • You code goes in src/app.py
  • If your action needs inputs, you need to declare them in action.yml and get their values from the environment in app.py. An example input for something is commented out in both files.
  • Create a virtualenv
  • Install the dependencies
  • Commit and push to the Github repo.

About

A cookiecutter template for generating GitHub actions running Python

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published