Skip to content

feat: use ghcr image instead of docker #540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,49 @@ jobs:
username: ewjoachim
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.6.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.10.0

- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }}
password: ${{ github.token }}

- id: docker_meta
uses: docker/metadata-action@v5.7.0
with:
images: ghcr.io/${{ github.repository }}
tags: type=sha,format=long

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
# See Dockerfile.build for instructions on bumping this.
context: .
file: Dockerfile.build
platforms: linux/amd64,linux/arm64
labels: |
project='python-coverage-comment-action-base'
org='py-cov-action'
commit-sha='${{ github.sha }}'
org.opencontainers.image.source='https://github.com/${{ github.repository }}'
org.opencontainers.image.description='Publish coverage report as PR comment, and create a coverage badge & dashboard to display on the Readme for Python projects, all inside GitHub without third party servers'
org.opencontainers.image.licenses='MIT'
tags: |
ewjoachim/python-coverage-comment-action-base:v6
ghcr.io/py-cov-action/python-coverage-comment-action-base:v6
${{ steps.docker_meta.outputs.tags }}
ghcr.io/${{ github.repository }}:${{ github.sha }}
ghcr.io/${{ github.repository }}:latest
cache-from: |
ghcr.io/${{ github.repository }}:${{ github.sha }}
ghcr.io/${{ github.repository }}:latest
cache-to: type=inline
push: true
file: Dockerfile.build
platforms: linux/amd64,linux/arm64

compute-tags:
name: Re-tag action with new version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See Dockerfile.build for instructions on bumping this.
FROM ewjoachim/python-coverage-comment-action-base:v6
FROM ghcr.io/py-cov-action/python-coverage-comment-action-base:v6

COPY coverage_comment ./coverage_comment
RUN md5sum -c pyproject.toml.md5 || pip install -e .
Loading