Initial commit: Nicotine-Less Docker container
Some checks failed
Build and Push Docker Image / check-version (push) Has been cancelled
Build and Push Docker Image / build (linux/amd64, linux-amd64:host) (push) Has been cancelled
Build and Push Docker Image / build (linux/arm64, linux-arm64:host) (push) Has been cancelled
Build and Push Docker Image / create-manifest (push) Has been cancelled
Some checks failed
Build and Push Docker Image / check-version (push) Has been cancelled
Build and Push Docker Image / build (linux/amd64, linux-amd64:host) (push) Has been cancelled
Build and Push Docker Image / build (linux/arm64, linux-arm64:host) (push) Has been cancelled
Build and Push Docker Image / create-manifest (push) Has been cancelled
A containerized Nicotine+ (Soulseek client) with noVNC web interface. Features: - Web-based VNC access with dynamic screen resizing - Firefox ESR browser included for port testing - Multi-architecture support (amd64, arm64) - Automated builds when Nicotine+ releases new versions - Mirrored Alpine base image to avoid Docker Hub rate limiting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
126
.gitea/workflows/build.yml
Normal file
126
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,126 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 * * * *' # Every hour
|
||||
|
||||
jobs:
|
||||
check-version:
|
||||
runs-on: linux-amd64:host
|
||||
container:
|
||||
image: git.nicola.sh/public/alpine:latest
|
||||
outputs:
|
||||
should_build: ${{ steps.compare.outputs.should_build }}
|
||||
latest_version: ${{ steps.get_version.outputs.version }}
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apk add --no-cache curl jq bash
|
||||
|
||||
- name: Get latest Nicotine+ version from PyPI
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(curl -s https://pypi.org/pypi/nicotine-plus/json | jq -r '.info.version')
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Latest Nicotine+ version: $VERSION"
|
||||
|
||||
- name: Get current built version
|
||||
id: current_version
|
||||
run: |
|
||||
CURRENT=$(curl -s https://git.nicola.sh/api/v1/repos/public/nicotine-less/releases/latest 2>/dev/null | jq -r '.tag_name // "none"')
|
||||
echo "current=$CURRENT" >> $GITHUB_OUTPUT
|
||||
echo "Current built version: $CURRENT"
|
||||
|
||||
- name: Compare versions
|
||||
id: compare
|
||||
run: |
|
||||
if [ "${{ steps.get_version.outputs.version }}" != "${{ steps.current_version.outputs.current }}" ]; then
|
||||
echo "should_build=true" >> $GITHUB_OUTPUT
|
||||
echo "New version detected, will build"
|
||||
else
|
||||
echo "should_build=false" >> $GITHUB_OUTPUT
|
||||
echo "Already up to date"
|
||||
fi
|
||||
|
||||
build:
|
||||
needs: check-version
|
||||
if: needs.check-version.outputs.should_build == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
runner: linux-amd64:host
|
||||
- platform: linux/arm64
|
||||
runner: linux-arm64:host
|
||||
runs-on: ${{ matrix.runner }}
|
||||
container:
|
||||
image: git.nicola.sh/public/alpine:latest
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apk add --no-cache git docker docker-cli-buildx
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
rm -rf nicotine-less
|
||||
git clone --depth 1 https://git.nicola.sh/public/nicotine-less.git nicotine-less
|
||||
cd nicotine-less
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
run: |
|
||||
docker buildx create --use --name builder --driver docker-container || docker buildx use builder
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.nicola.sh -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build and push
|
||||
run: |
|
||||
cd nicotine-less
|
||||
docker buildx build \
|
||||
--platform ${{ matrix.platform }} \
|
||||
--tag git.nicola.sh/public/nicotine-less:latest-${{ matrix.platform }} \
|
||||
--tag git.nicola.sh/public/nicotine-less:${{ needs.check-version.outputs.latest_version }}-${{ matrix.platform }} \
|
||||
--cache-from type=registry,ref=git.nicola.sh/public/nicotine-less:buildcache-${{ matrix.platform }} \
|
||||
--cache-to type=registry,ref=git.nicola.sh/public/nicotine-less:buildcache-${{ matrix.platform }},mode=max \
|
||||
--push \
|
||||
.
|
||||
|
||||
create-manifest:
|
||||
needs: [check-version, build]
|
||||
runs-on: linux-amd64:host
|
||||
container:
|
||||
image: git.nicola.sh/public/alpine:latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apk add --no-cache docker docker-cli-buildx curl bash
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.nicola.sh -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Create and push multi-arch manifest
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
-t git.nicola.sh/public/nicotine-less:latest \
|
||||
-t git.nicola.sh/public/nicotine-less:${{ needs.check-version.outputs.latest_version }} \
|
||||
git.nicola.sh/public/nicotine-less:latest-linux/amd64 \
|
||||
git.nicola.sh/public/nicotine-less:latest-linux/arm64
|
||||
|
||||
- name: Create release
|
||||
if: needs.check-version.outputs.should_build == 'true'
|
||||
run: |
|
||||
curl -X POST "https://git.nicola.sh/api/v1/repos/public/nicotine-less/releases" \
|
||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"tag_name\": \"${{ needs.check-version.outputs.latest_version }}\",
|
||||
\"name\": \"Nicotine+ ${{ needs.check-version.outputs.latest_version }}\",
|
||||
\"body\": \"Automated build with Nicotine+ version ${{ needs.check-version.outputs.latest_version }}\"
|
||||
}"
|
||||
29
.gitea/workflows/mirror-alpine.yml
Normal file
29
.gitea/workflows/mirror-alpine.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Mirror Alpine Image
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * 0' # Weekly on Sunday at 3 AM
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: linux-amd64
|
||||
container:
|
||||
image: git.nicola.sh/public/alpine:latest
|
||||
steps:
|
||||
- name: Install Docker CLI
|
||||
run: |
|
||||
apk add --no-cache docker-cli
|
||||
|
||||
- name: Pull Alpine from Docker Hub
|
||||
run: |
|
||||
docker pull alpine:latest
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.nicola.sh -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Tag and push to Gitea registry
|
||||
run: |
|
||||
docker tag alpine:latest git.nicola.sh/public/alpine:latest
|
||||
docker push git.nicola.sh/public/alpine:latest
|
||||
Reference in New Issue
Block a user