From 8ccd8a5fd38dc71662f03a1adc90943e28475975 Mon Sep 17 00:00:00 2001 From: blankie Date: Tue, 9 Jun 2026 01:08:39 +0000 Subject: [PATCH] remove forgejo CI workflow (no releases) --- .forgejo/workflows/build.yml | 81 ------------------------------------ 1 file changed, 81 deletions(-) delete mode 100644 .forgejo/workflows/build.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml deleted file mode 100644 index a145b1d..0000000 --- a/.forgejo/workflows/build.yml +++ /dev/null @@ -1,81 +0,0 @@ -on: - push: - tags: - - 'v*.*.*' - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: https://code.forgejo.org/actions/checkout@v4 - - - name: Set up Python - run: | - apt-get update && apt-get install -y python3 python3-pip python3-venv jq curl - curl -fsSL https://get.docker.com | sh - pip3 install --break-system-packages -r requirements.txt - pip3 install --break-system-packages pyinstaller - - - name: Build with PyInstaller - run: | - pyinstaller --onefile --console --name TinyWeb app.py - - - name: Prepare artifact - run: | - cp dist/TinyWeb TinyWeb-linux-x64 - chmod +x TinyWeb-linux-x64 - ls -la TinyWeb-linux-x64 - - - name: Get Release ID - if: startsWith(github.ref, 'refs/tags/v') - id: release - run: | - TAG="${{ github.ref_name }}" - REPO="${{ github.repository }}" - TOKEN="${{ secrets.FORGEJO_TOKEN }}" - RELEASE_JSON=$(curl -s "https://git.example.com/api/v1/repos/$REPO/releases/tags/$TAG" \ - -H "Authorization: token $TOKEN") - echo "$RELEASE_JSON" - RELEASE_ID=$(echo "$RELEASE_JSON" | jq -r '.id') - echo "release_id=$RELEASE_ID" >> $FORGEJO_OUTPUT - - - name: Upload to Release - if: startsWith(github.ref, 'refs/tags/v') - run: | - FILE=TinyWeb-linux-x64 - RELEASE_ID="${{ steps.release.outputs.release_id }}" - REPO="${{ github.repository }}" - TOKEN="${{ secrets.FORGEJO_TOKEN }}" - curl -X POST "https://git.example.com/api/v1/repos/$REPO/releases/$RELEASE_ID/assets" \ - -H "Authorization: token $TOKEN" \ - -F "attachment=@$FILE" - - - name: Login to Registry - run: | - echo "${{ secrets.REGISTRY_TOKEN }}" | docker login registry.example.com -u _ --password-stdin - - - name: Build and push Docker image - run: | - TAG="${{ github.ref_name }}" - if [ -z "$TAG" ]; then - TAG="latest" - fi - # Configure Docker daemon with DNS - mkdir -p ~/.docker - cat > ~/.docker/daemon.json << 'EOF' - { - "dns": ["8.8.8.8", "1.1.1.1"], - "builder": { - "features": { - "buildkit": true - } - } - } - EOF - # Build with buildkit - DOCKER_BUILDKIT=1 docker build --network=host -t registry.example.com/tinyweb:$TAG . - docker push registry.example.com/tinyweb:$TAG -