Add docker build step to provide ready-to-use dockge cli container
Some checks failed
/ pylint (push) Successful in 13s
/ mypy (push) Successful in 14s
/ build-and-push-container (push) Has been skipped
/ release (push) Has been skipped
/ lint-and-typing (push) Successful in 17s
/ publish-artifacts (push) Failing after 9s
/ build-artifacts (push) Successful in 9s

This commit is contained in:
Firq 2024-07-22 17:40:57 +02:00
parent 44a0409798
commit 003204afb1
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
2 changed files with 39 additions and 0 deletions

View file

@ -56,3 +56,38 @@ jobs:
run: pip install twine run: pip install twine
- name: Upload package to registry - name: Upload package to registry
run: python -m twine upload --repository-url ${{ secrets.REPOSITORY_URL }} -u ${{ secrets.TWINE_DEPLOY_USER }} -p ${{ secrets.TWINE_DEPLOY_PASSWORD }} dist/* run: python -m twine upload --repository-url ${{ secrets.REPOSITORY_URL }} -u ${{ secrets.TWINE_DEPLOY_USER }} -p ${{ secrets.TWINE_DEPLOY_PASSWORD }} dist/*
build-and-push-container:
needs: [ "publish-artifacts" ]
runs-on: dind
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into Docker Package Registry
uses: docker/login-action@v3
with:
registry: forgejo.neshweb.net
username: ${{ secrets.FORGEJO_USERNAME }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Build and push to Docker Package Registry
uses: docker/build-push-action@v5
with:
context: .
build-args: |
PACKAGE_VERSION=${{ github.ref_name }}
push: true
tags: forgejo.neshweb.net/firq/dockge-cli:${{ github.ref_name }}
release:
needs: [ build-and-push-container, publish-artifacts ]
if: success()
runs-on: docker
steps:
- name: Release New Version
uses: actions/forgejo-release@v1
with:
direction: upload
url: https://forgejo.neshweb.net
release-dir: release
token: ${{ secrets.FORGEJO_TOKEN }}
tag: ${{ github.ref_name }}

4
Dockerfile Normal file
View file

@ -0,0 +1,4 @@
FROM forgejo.neshweb.net/ci-docker-images/python-neshweb:3.11
ARG PACKAGE_VERSION=0.1.0
RUN pip install dockge-cli==${PACKAGE_VERSION}