pyaction
Overview
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.
Docker Tags
For the current version of Python (e.g., 3.13.5) and current version of GitHub CLI (e.g., 2.76.2),
all of the following tags are available and equivalent: latest
, 3.13.5
,
3.13
, 3.13.5-gh-2.76.2
, 3.13.5-gh-2.76
, 3.13.5-gh-2
,
3.13-gh-2.76.2
, 3.13-gh-2.76
, 3.13-gh-2
.
For prior versions of Python (3.8, 3.9, 3.10, 3.11, 3.12) and current version of GitHub CLI (2.76.2),
all of the following tags are available and equivalent: 3.12
, 3.12-gh-2.76.2
,
3.12-gh-2.76
, 3.12-gh-2
.
This tag scheme began with version 2.75.0 of the GitHub CLI. We don't support pyaction images with earlier versions of the GitHub CLI.
This tag scheme began with Python 3.13.5. Python patch level tags are not available for pyaction prior to Python 3.13.5.
Usage
The pre-built image is hosted on both Docker Hub and the Github Container Registry. You can use it in the following ways.
Docker Pull: Pull the latest image from Docker Hub with the following (replace
latest
with a specific version number if you prefer):
docker pull cicirello/pyaction:latest
Base Image in a Dockerfile: Use as a base image in a Dockerfile (replace latest
with a specific version number if you prefer):
FROM cicirello/pyaction:latest
# The rest of your Dockerfile would go here.
Docker Pull: Pull from the Github Container Registry with:
docker pull ghcr.io/cicirello/pyaction:latest
Base Image in a Dockerfile: Use as a base image in a Dockerfile (via the Github Container Registry) with:
FROM ghcr.io/cicirello/pyaction:latest
# The rest of your Dockerfile would go here.
License
Source Code License: The source code, including the Dockerfile and anything else within the Github repository for pyaction, is licensed under the MIT License.
Image Licenses: As with all pre-built Docker images, the image itself (once built, or obtained from Docker Hub or the Github Container Registry) contains software that is covered by a variety of licenses. See the license information for the python docker image, the license for git, the license for GitHub CLI, and the license for Python.
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.
pyaction: Python and the GitHub CLI in a Docker Container, posted on DEV on August 14, 2025.
A post providing an update on the current state of pyaction, including explaining the new tagging scheme that is based on Python and GitHub CLI version numbers.
pyaction pulled 4 million times and counting from the GitHub Container Registry, posted on DEV on May 31, 2024.
A post celebrating a milestone of 4 million downloads of pyaction from the GitHub Container Registry.
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.