From 78549910fa8831459ff9e8e464f999006b81ba61 Mon Sep 17 00:00:00 2001 From: Firq Date: Mon, 22 Jul 2024 12:40:07 +0200 Subject: [PATCH] First Test --- .forgejo/workflows/build_release.yml | 36 ++++++++++++++++++++++++++++ .gitignore | 1 + Dockerfile | 4 ++++ README.md | 2 +- pip.conf | 8 +++++++ 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/build_release.yml create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 pip.conf diff --git a/.forgejo/workflows/build_release.yml b/.forgejo/workflows/build_release.yml new file mode 100644 index 0000000..fe08249 --- /dev/null +++ b/.forgejo/workflows/build_release.yml @@ -0,0 +1,36 @@ +on: + push: + tags: + - '[0-9]+\.[0-9]+' + +jobs: + build: + 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: + push: true + tags: forgejo.neshweb.net/ci-docker-images/python-neshweb:${{ github.ref_name }} + + release: + needs: [ build ] + 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 }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbe9c82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..df3f0b8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nikolaik/python-nodejs:python3.11-nodejs21-alpine +RUN apk -U upgrade && apk add --no-cache git openssh + +COPY pip.conf /etc/pip.conf diff --git a/README.md b/README.md index 0cc77cf..dc2052c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # python-neshweb -A Python container preconfigured with the correct settings to pull from Pypi indexes on Neshweb \ No newline at end of file +A Python 3.11 and NodeJS 21 container preconfigured with the correct settings to pull from PyPi indexes on Neshweb diff --git a/pip.conf b/pip.conf new file mode 100644 index 0000000..e3f9ba7 --- /dev/null +++ b/pip.conf @@ -0,0 +1,8 @@ +[global] +timeout = 60 +index-url = https://pypi.org/simple +extra-index-url = + https://forgejo.neshweb.net/api/packages/Firq/pypi/simple/ +trusted-host = + pypi.org + forgejo.neshweb.net