From b480bc3e44fd68c6ba0fb52d3a570d762d3f7b7d Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:01:02 -0300 Subject: [PATCH] Update to Python 3.12 --- .github/workflows/ci.yml | 23 ++++++----------------- .github/workflows/pyinstaller.yaml | 12 ++++++------ Dockerfile | 4 ++-- 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43b65977..f26030f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,7 @@ name: ci on: push: branches: - - 'master' - tags: - - "*" + - 'python3.12' jobs: docker: @@ -20,26 +18,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ secrets.DOCKERHUB_USERNAME }}/zoffline - tags: | - type=ref,event=tag - type=raw,value=latest,enable={{is_default_branch}} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v5 with: context: . - labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ghcr.io/${{ github.repository_owner }}/zoffline:latest diff --git a/.github/workflows/pyinstaller.yaml b/.github/workflows/pyinstaller.yaml index 08d4afad..dbc5f782 100644 --- a/.github/workflows/pyinstaller.yaml +++ b/.github/workflows/pyinstaller.yaml @@ -3,7 +3,7 @@ name: pyinstaller on: push: branches: - - master + - python3.12 jobs: build: @@ -13,20 +13,20 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - uses: engineerd/configurator@v0.0.10 with: name: "upx.exe" - url: "https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-win64.zip" - pathInArchive: "upx-4.2.1-win64/upx.exe" + url: "https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-win64.zip" + pathInArchive: "upx-4.2.2-win64/upx.exe" - run: pip install -r requirements.txt - run: pip install pyinstaller garth - run: pyinstaller standalone.spec - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/* diff --git a/Dockerfile b/Dockerfile index 79f93e34..061fe472 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine as builder +FROM python:3.12-alpine as builder WORKDIR /usr/src/app @@ -10,7 +10,7 @@ COPY requirements.txt requirements.txt RUN pip install --user --requirement requirements.txt RUN pip install --user garth -FROM python:3.11-alpine +FROM python:3.12-alpine MAINTAINER zoffline WORKDIR /usr/src/app