The pyaction container is a Python slim image that includes all of the following pre-installed: git, the GitHub CLI, gpg and curl. The motivating use-case is developing GitHub Actions in the Python language, which is the origin of why this container includes Python, git, and the GitHub CLI. Installing the GitHub CLI requires gpg and curl, which is why these are also in the container. Since they may also be useful in implementing some actions, our container build process does not uninstall them. The pyaction container can be pulled from Docker Hub as well as the GitHub Container Registry. When using pyaction in the development of a GitHub Container Action, we recommend pulling from the GitHub Container Registry, as it is likely faster for that use-case. It is certainly not limited to GitHub Action development, and can be used for any other use-case where having the GitHub CLI running in a Docker container is desirable.
GitHub Actions Built With pyaction
The pyaction container serves as a foundation for several of our GitHub Actions. These include the following (each linked to a page with more detail):
- jacoco-badge-generator: Generates coverage badges from JaCoCo reports, and enables pull request coverage checks, such as based on minimum coverage thresholds, as well as based on decreases in coverage.
- user-statistician: Generates detailed summary statistics cards in SVG format suitable to display in your GitHub Profile README or on a personal website.
- generate-sitemap: Generates XML sitemaps for static websites served from a git repository, such as GitHub Pages sites.
- javadoc-cleanup: Creates mobile-friendly documentation sites by post-processing javadocs.
- count-action-users: A meta-action that monitors and reports the number of users of one or more GitHub Actions.
Blog Posts About pyaction
As the author of the pyaction Docker Container, I occasionally post about this, and other software that I maintain on DEV.to. See my DEV.to profile for a full list of such posts. Below is a selection of blog posts specifically about pyaction.
Celebrating over 2 million pulls of pyaction from the GitHub Container Registry, posted on DEV on September 2, 2023.
A post celebrating a milestone of 2 million downloads of pyaction from the GitHub Container Registry.
pyaction: Over 1 million pulls from the GitHub Container Registry, posted on DEV on February 16, 2023.
A post celebrating a milestone of 1 million downloads of pyaction from the GitHub Container Registry.
pyaction: A Docker container with Python, git, and the GitHub CLI, posted on DEV on December 28, 2022.
This post provides an overview of the pyaction Docker container, designed to simplify implementing GitHub Actions with Python, but also more generally applicable wherever you need Python and the GitHub CLI within a Docker container.