15 Commits

Author SHA1 Message Date
renovate 3d79f0c2c0 chore(deps): update debian docker tag to v13
Docker Build and Push / lint (pull_request) Successful in 7s
Docker Build and Push / build (pull_request) Failing after 12s
Docker Build and Push / test (pull_request) Has been skipped
Docker Build and Push / push (pull_request) Has been skipped
2026-06-11 02:40:38 +00:00
jcabillot 09d016ea62 Merge pull request 'chore(config): migrate Renovate config' (#8) from renovate/migrate-config into master
Docker Build and Push / build (push) Successful in 58s
Docker Build and Push / lint (push) Failing after 13m55s
Docker Build and Push / test (push) Has been skipped
Docker Build and Push / push (push) Has been skipped
Reviewed-on: #8
2026-06-09 11:16:19 -04:00
renovate ef003fa0ae chore(config): migrate config renovate.json
Docker Build and Push / lint (pull_request) Successful in 6s
Docker Build and Push / build (pull_request) Successful in 57s
Docker Build and Push / test (pull_request) Successful in 22s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-09 14:29:55 +00:00
jcabillot c32609b256 Merge pull request 'chore: improve renovate dependency detection' (#5) from chore/renovate into master
Docker Build and Push / lint (push) Successful in 10s
Docker Build and Push / build (push) Successful in 49s
Docker Build and Push / test (push) Successful in 28s
Docker Build and Push / push (push) Successful in 43s
Reviewed-on: #5
2026-06-09 10:11:09 -04:00
opencodecabilloteu a9fffe0017 chore: remove redundant FROM regexManager, quotes already fixed in Dockerfile
Docker Build and Push / lint (pull_request) Successful in 7s
Docker Build and Push / build (pull_request) Successful in 56s
Docker Build and Push / test (pull_request) Successful in 35s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-09 14:06:00 +00:00
opencodecabilloteu ceace4cbcf chore: remove redundant configs now handled globally
Docker Build and Push / lint (pull_request) Successful in 7s
Docker Build and Push / build (pull_request) Successful in 1m28s
Docker Build and Push / test (pull_request) Successful in 25s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-09 13:41:05 +00:00
opencodecabilloteu 1319d1d3c2 chore: improve renovate dependency detection
Docker Build and Push / lint (pull_request) Successful in 9s
Docker Build and Push / build (pull_request) Failing after 1m27s
Docker Build and Push / test (pull_request) Has been skipped
Docker Build and Push / push (pull_request) Has been skipped
- Add renovate.json with custom regexManagers for:
  - Quoted FROM images (debian:buster)
  - SABNZBD_VERSION, TINI_VERSION, PAR2CMDLINE_VERSION env pins
- Disable gitlabci manager (legacy CI, migrated to Gitea Actions)
- Remove unnecessary quotes from FROM image reference
2026-06-09 02:15:40 +00:00
jcabillot 7ca58ebb9e Merge pull request 'Update hadolint/hadolint-action action to v3.3.0' (#4) from renovate/hadolint-hadolint-action-3.x into master
Docker Build and Push / lint (push) Successful in 6s
Docker Build and Push / build (push) Successful in 1m30s
Docker Build and Push / test (push) Successful in 41s
Docker Build and Push / push (push) Successful in 52s
Reviewed-on: #4
2026-06-08 18:16:31 -04:00
renovate 942a9f9970 Update hadolint/hadolint-action action to v3.3.0
Docker Build and Push / lint (pull_request) Successful in 9s
Docker Build and Push / build (pull_request) Successful in 2m21s
Docker Build and Push / test (pull_request) Successful in 53s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-08 21:43:48 +00:00
jcabillot 9c9447e497 Merge pull request 'feat: add lint, build, test, push pipeline with SHA-pinned actions' (#3) from feat/gitea-actions-v2 into master
Docker Build and Push / lint (push) Successful in 5s
Docker Build and Push / build (push) Successful in 2m22s
Docker Build and Push / test (push) Successful in 24s
Docker Build and Push / push (push) Successful in 43s
Reviewed-on: #3
2026-06-08 17:40:27 -04:00
opencodecabilloteu 8b6088cee9 fix: redirect deb.debian.org to archive.debian.org for buster EOL
Docker Build and Push / lint (pull_request) Successful in 6s
Docker Build and Push / build (pull_request) Successful in 2m42s
Docker Build and Push / test (pull_request) Successful in 21s
Docker Build and Push / push (pull_request) Has been skipped
2026-06-08 21:25:27 +00:00
opencodecabilloteu c0b250624f fix: add DL3013,DL3042 to hadolint ignore for pip install
Docker Build and Push / lint (pull_request) Successful in 9s
Docker Build and Push / build (pull_request) Failing after 13s
Docker Build and Push / test (pull_request) Has been skipped
Docker Build and Push / push (pull_request) Has been skipped
2026-06-08 20:46:03 +00:00
opencodecabilloteu fb21d41f32 fix: unquote HEALTHCHECK interval to satisfy hadolint parser
Docker Build and Push / lint (pull_request) Failing after 6s
Docker Build and Push / build (pull_request) Failing after 10s
Docker Build and Push / test (pull_request) Has been skipped
Docker Build and Push / push (pull_request) Has been skipped
2026-06-08 19:53:14 +00:00
opencodecabilloteu b9f2cd448b feat: add lint, build, test, push pipeline with SHA-pinned actions
Docker Build and Push / lint (pull_request) Failing after 8s
Docker Build and Push / build (pull_request) Failing after 25s
Docker Build and Push / test (pull_request) Has been skipped
Docker Build and Push / push (pull_request) Has been skipped
- Split single build job into 4 jobs: lint, build, test, push
- SHA-pin all actions for supply chain security
- Use ChristopherHX artifact actions (Gitea-compatible)
- Add tests/test.sh with Docker bridge gateway networking
- Add hadolint ignore for apt/brace patterns
2026-06-08 19:41:55 +00:00
jcabillot 4326789e15 feat: add Gitea Actions workflow
Docker Build and Push / build (push) Failing after 30s
feat: add Gitea Actions workflow
2026-05-29 16:23:14 -04:00
4 changed files with 187 additions and 26 deletions
+60 -24
View File
@@ -9,38 +9,74 @@ on:
- cron: '0 0 * * *' - cron: '0 0 * * *'
jobs: jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Hadolint
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: Dockerfile
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Set up Docker Buildx - name: Build image
uses: docker/setup-buildx-action@v4 run: docker build -t ci-image:${{ github.sha }} .
- name: Save image
run: docker save -o image.tar ci-image:${{ github.sha }}
- name: Upload artifact
uses: https://github.com/ChristopherHX/gitea-upload-artifact@62ac910c5d3dfa85c7cb2df15afe2e342b2407c2 # main
with:
name: docker-image
path: image.tar
retention-days: 1
test:
runs-on: ubuntu-latest
needs: [lint, build]
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Download artifact
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # main
with:
name: docker-image
- name: Load image
run: docker load < image.tar
- name: Run tests
run: bash tests/test.sh ci-image:${{ github.sha }}
push:
runs-on: ubuntu-latest
needs: test
if: github.event_name != 'pull_request'
steps:
- name: Download artifact
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 # main
with:
name: docker-image
- name: Load image
run: docker load < image.tar
- name: Login to Docker Hub - name: Login to Docker Hub
if: github.event_name != 'pull_request' uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
uses: docker/login-action@v4
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker metadata - name: Tag and push
id: meta run: |
uses: docker/metadata-action@v6 docker tag ci-image:${{ github.sha }} jcabillot/sabnzbd:latest
with: docker push jcabillot/sabnzbd:latest
images: jcabillot/sabnzbd
tags: |
#type=ref,event=branch
#type=ref,event=pr
#type=sha
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
pull: true
+4 -2
View File
@@ -1,4 +1,4 @@
FROM "debian:buster" FROM debian:trixie-20260610
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>" LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
RUN groupadd -r -g 666 sabnzbd && \ RUN groupadd -r -g 666 sabnzbd && \
@@ -21,11 +21,13 @@ ENV LANG C.UTF-8
# Install SABnzbd and all required dependencies. # Install SABnzbd and all required dependencies.
# #
# hadolint ignore=DL3008,DL3015,SC3009,DL3003,DL3013,DL3042
RUN export SABNZBD_VERSION=3.7.2 PAR2CMDLINE_VERSION=v0.6.14-mt1 && \ RUN export SABNZBD_VERSION=3.7.2 PAR2CMDLINE_VERSION=v0.6.14-mt1 && \
export DEBIAN_FRONTEND=noninteractive && \ export DEBIAN_FRONTEND=noninteractive && \
export BUILD_PACKAGES="automake build-essential python3-dev libffi-dev" && \ export BUILD_PACKAGES="automake build-essential python3-dev libffi-dev" && \
export RUNTIME_PACKAGES="ca-certificates p7zip-full python3-yenc unrar unzip libgomp1 openssl python3-openssl curl python3-pip" && \ export RUNTIME_PACKAGES="ca-certificates p7zip-full python3-yenc unrar unzip libgomp1 openssl python3-openssl curl python3-pip" && \
export PIP_PACKAGES="sabyenc" && \ export PIP_PACKAGES="sabyenc" && \
sed -i 's|http://deb.debian.org|http://archive.debian.org|g' /etc/apt/sources.list && \
sed -i "s/ main$/ main contrib non-free/" /etc/apt/sources.list && \ sed -i "s/ main$/ main contrib non-free/" /etc/apt/sources.list && \
apt-get -qq update && \ apt-get -qq update && \
apt-get -qq --yes install $BUILD_PACKAGES $RUNTIME_PACKAGES && \ apt-get -qq --yes install $BUILD_PACKAGES $RUNTIME_PACKAGES && \
@@ -79,5 +81,5 @@ RUN chmod +x "/tini"
CMD ["/sabnzbd.sh"] CMD ["/sabnzbd.sh"]
HEALTHCHECK --interval="10s" \ HEALTHCHECK --interval=10s \
CMD curl --fail "http://localhost:8080" || exit 1 CMD curl --fail "http://localhost:8080" || exit 1
+41
View File
@@ -0,0 +1,41 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customManagers": [
{
"customType": "regex",
"description": "Detect SABnzbd release version pin",
"managerFilePatterns": [
"/^Dockerfile$/"
],
"matchStrings": [
"SABNZBD_VERSION=(?<currentValue>[0-9.]+)"
],
"depNameTemplate": "sabnzbd/sabnzbd",
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"description": "Detect Tini release version pin",
"managerFilePatterns": [
"/^Dockerfile$/"
],
"matchStrings": [
"TINI_VERSION\\s+v?(?<currentValue>[0-9.]+)"
],
"depNameTemplate": "krallin/tini",
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"description": "Detect par2cmdline release version pin",
"managerFilePatterns": [
"/^Dockerfile$/"
],
"matchStrings": [
"PAR2CMDLINE_VERSION=v?(?<currentValue>[0-9a-z.]+-mt\\d+)"
],
"depNameTemplate": "jkansanen/par2cmdline-mt",
"datasourceTemplate": "github-tags"
}
]
}
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env bash
set -euo pipefail
IMAGE="${1:?Usage: test.sh <image>}"
CONTAINER_NAME="test-$(echo "$IMAGE" | tr ':/' '-')-$$"
PASSED=0
FAILED=0
TOTAL=0
cleanup() {
docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true
}
trap cleanup EXIT
assert() {
local name="$1" expected="$2" actual="$3"
TOTAL=$((TOTAL + 1))
if [ "$expected" = "$actual" ]; then
echo " PASS: $name"
PASSED=$((PASSED + 1))
else
echo " FAIL: $name (expected: '$expected', got: '$actual')"
FAILED=$((FAILED + 1))
fi
}
assert_in() {
local name="$1" expected="$2" actual="$3"
TOTAL=$((TOTAL + 1))
if [ "$actual" -ge "$expected" ] && [ "$actual" -lt 500 ]; then
echo " PASS: $name (got: $actual)"
PASSED=$((PASSED + 1))
else
echo " FAIL: $name (expected < 500, got: $actual)"
FAILED=$((FAILED + 1))
fi
}
assert_match() {
local name="$1" pattern="$2" actual="$3"
TOTAL=$((TOTAL + 1))
if echo "$actual" | grep -qE "$pattern"; then
echo " PASS: $name"
PASSED=$((PASSED + 1))
else
echo " FAIL: $name (pattern: '$pattern', got: '$actual')"
FAILED=$((FAILED + 1))
fi
}
echo "Running container: $IMAGE"
docker run -d --name "$CONTAINER_NAME" -p 8080:8080 "$IMAGE" >/dev/null
DOCKER_GW=$(docker network inspect bridge --format '{{range .IPAM.Config}}{{.Gateway}}{{end}}')
BASE_URL="http://${DOCKER_GW}:8080"
echo "Waiting for SABnzbd on ${DOCKER_GW}:8080 (up to 60s)..."
for i in $(seq 1 60); do
if [ "$(curl -s -o /dev/null -w '%{http_code}' "$BASE_URL/" 2>/dev/null)" != "000" ]; then
echo "Container ready after ${i}s"
break
fi
if [ "$i" -eq 60 ]; then
echo "FAIL: Container did not become ready within 60s"
docker logs "$CONTAINER_NAME"
exit 1
fi
sleep 1
done
echo ""
echo "Test: GET / (SABnzbd web UI)"
RESPONSE=$(curl -s -D - "$BASE_URL/")
STATUS=$(echo "$RESPONSE" | head -1 | grep -oP '\d{3}')
BODY=$(echo "$RESPONSE" | sed -n '/^\r$/,$p' | tail -n +2)
assert_in "HTTP status is valid" 200 "$STATUS"
assert_match "Body contains SABnzbd" "[Ss][Aa][Bb].*[Nn]zbd" "$BODY"
echo ""
echo "Results: $PASSED/$TOTAL passed, $FAILED failed"
[ "$FAILED" -eq 0 ]