diff options
author | 2024-01-13 21:35:21 +0200 | |
---|---|---|
committer | 2024-01-13 21:35:21 +0200 | |
commit | 62448c9034420e277c76d703416d3260d70b6963 (patch) | |
tree | f5a39cb241f2c787c4df586c0f8010ce11d33dac /.github | |
parent | pyproject.toml: add runtime dependency on setuptools (py>=3.12) (diff) | |
download | pkgcheck-62448c9034420e277c76d703416d3260d70b6963.tar.gz pkgcheck-62448c9034420e277c76d703416d3260d70b6963.tar.bz2 pkgcheck-62448c9034420e277c76d703416d3260d70b6963.zip |
Dockerfile: introduce pkgcheck docker on release
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/release.yml | 43 |
1 files changed, 43 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 }} |