aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-01-13 21:35:21 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-01-13 21:35:21 +0200
commit62448c9034420e277c76d703416d3260d70b6963 (patch)
treef5a39cb241f2c787c4df586c0f8010ce11d33dac
parentpyproject.toml: add runtime dependency on setuptools (py>=3.12) (diff)
downloadpkgcheck-62448c9034420e277c76d703416d3260d70b6963.tar.gz
pkgcheck-62448c9034420e277c76d703416d3260d70b6963.tar.bz2
pkgcheck-62448c9034420e277c76d703416d3260d70b6963.zip
Dockerfile: introduce pkgcheck docker on release
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--.github/workflows/release.yml43
-rw-r--r--Dockerfile6
2 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f9e1c6fc..f7911a55 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -101,3 +101,46 @@ jobs:
files: dist/*.tar.gz
fail_on_unmatched_files: true
draft: true
+
+ build-and-push-docker-image:
+ if: startsWith(github.ref, 'refs/tags/')
+ needs: ["deploy"]
+ runs-on: ubuntu-latest
+ environment: release
+
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Scrape build info
+ run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
+
+ - name: Log in to the Container registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ghcr.io/pkgcore/pkgcheck
+ tags: |
+ type=semver,pattern={{version}}
+ type=sha
+
+ - name: Build and push
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ build-args: |
+ PKGCHECK_VERSION=${{ env.RELEASE_VERSION }}
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..42c3b37d
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,6 @@
+FROM python:3-slim
+ARG PKGCHECK_VERSION
+
+RUN apt-get update && apt-get install -y git && \
+ rm -rf /var/lib/apt/lists/ /var/cache/apt && \
+ pip install pkgcheck==${PKGCHECK_VERSION} setuptools