All Projects → k2bd → action-python-poetry

k2bd / action-python-poetry

Licence: MIT license
Template repo to quickly make a tested and documented GitHub action in Python with Poetry

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to action-python-poetry

zola-deploy-action
Github action for building a Zola site and deploying to Github Pages
Stars: ✭ 131 (+54.12%)
Mutual labels:  actions, github-actions
changelog-reader-action
A GitHub action to read and get data from the CHANGELOG.md file 🚀
Stars: ✭ 68 (-20%)
Mutual labels:  actions, github-actions
link-snitch
GitHub Action to scan your site for broken links so you can fix them 🔗
Stars: ✭ 50 (-41.18%)
Mutual labels:  actions, github-actions
code-owner-self-merge
A GitHub Action for letting CODEOWNERS merge PRs via green PR reviews
Stars: ✭ 43 (-49.41%)
Mutual labels:  actions, github-actions
gradle-actions
Github Actions for Gradle
Stars: ✭ 29 (-65.88%)
Mutual labels:  actions, github-actions
chart-testing-action
A GitHub Action to lint and test Helm charts
Stars: ✭ 139 (+63.53%)
Mutual labels:  actions, github-actions
action-cats
A quick Github action which posts a cat gif on your PRs to reward you for pushing code!
Stars: ✭ 64 (-24.71%)
Mutual labels:  actions, github-actions
nrwl-nx-action
A GitHub Action to wrap Nrwl Nx commands in your workflows.
Stars: ✭ 163 (+91.76%)
Mutual labels:  actions, github-actions
ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (-27.06%)
Mutual labels:  actions, github-actions
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+64.71%)
Mutual labels:  actions, github-actions
gh-actions
A Github action for generating Terraform module documentation using terraform-docs and gomplate
Stars: ✭ 56 (-34.12%)
Mutual labels:  actions, github-actions
jacoco-report
Github action that publishes the JaCoCo report as a comment in the Pull Request
Stars: ✭ 31 (-63.53%)
Mutual labels:  actions, github-actions
algoliasearch-crawler-github-actions
Algolia Crawler Github action
Stars: ✭ 24 (-71.76%)
Mutual labels:  actions, github-actions
branch-protection-bot
A bot tool to disable and re-enable "Include administrators" option in branch protection
Stars: ✭ 57 (-32.94%)
Mutual labels:  actions, github-actions
jest-github-action
Jest action adding checks with annotations to your pull requests and coverage table as comments
Stars: ✭ 134 (+57.65%)
Mutual labels:  actions, github-actions
node
npm's fork of nodejs/node, for sending PRs to update deps/npm
Stars: ✭ 30 (-64.71%)
Mutual labels:  templates, actions
ghaction-chocolatey
GitHub Action for Chocolatey, the package manager for Windows
Stars: ✭ 58 (-31.76%)
Mutual labels:  actions, github-actions
actions
Collection of repetitive GitHub Actions
Stars: ✭ 12 (-85.88%)
Mutual labels:  actions, github-actions
xray-action
... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.
Stars: ✭ 16 (-81.18%)
Mutual labels:  actions, github-actions
action-junit-report
Reports junit test results as GitHub Pull Request Check
Stars: ✭ 103 (+21.18%)
Mutual labels:  actions, github-actions

Python + Poetry GitHub Action Template

Getting started from the template

  1. Rename the src/action_python_poetry package.
  2. Globally replace instances of action-python-poetry and action_python_poetry with your project and package name.
  3. If your repo is private, set it up on CodeCov and add a codecov token to your repo under the CODECOV_TOKEN secret.
  4. Create and test your action. __main__.py in your package will be executed when the action is run. The environment variables your tests use can be set in pyproject.toml and/or managed in test fixtures.
  5. Update action.yml, README.md, and .github/workflows/test-action.yml to reflect your action's specification.
  6. Update LICENSE.md as appropriate, making sure to retain the original copyright and permissions notices in your distribution according to the MIT license that this template is distributed under.
  7. Remove this section from README.md.
  8. Happy hacking!

Like this template?

"Buy Me A Coffee"

Quickstart

name: Run Action
on:
  workflow_dispatch:

jobs:
  action-python-poetry:
    runs-on: ubuntu-latest
    steps:
      - uses: k2bd/action-python-poetry@v1
        with:
          helloName: k2bd
          repeats: 3

Action Specification

helloName

Required

The name of the person to say hello to

repeats

Optional - default 1

Number of times to say hello to this person

Developing

Install Poetry and poetry install the project

Useful Commands

Note: if Poetry is managing a virtual environment for you, you may need to use poetry run poe instead of poe

  • poe autoformat - Autoformat code
  • poe lint - Linting
  • poe test - Run Tests

Testing the action

The action can be tested locally by building the Dockerfile, e.g.

docker run -e INPUT_HELLONAME=k2bd -e INPUT_REPEATS=2 $(docker build -q .)

Additionally, there is a manual invocation action on the repo called "Test Action" that can be used to invoke the repo's version of the action from the Actions tab of the repo.

Releasing

Release a new version by creating a new annotated semver tag e.g. git tag -a v1.2.3 -m "Release version 1.2.3" and pushing it (git push --tags). Then create a new release from that tag in GitHub.

There is an autoversioning action that keeps major version tags (v1, v2, ...) and latest up-to-date when a new release is published.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].