fix(ci): remove sudo from docker install — Gitea ubuntu runner is root without sudo
Some checks failed
Admin Web Docker / Docker Build Validation (pull_request) Successful in 1m2s
Admin Web Docker / Semantic Release (pull_request) Has been skipped
CI / Detect Changes (pull_request) Successful in 4s
Admin Web Docker / Build & Push Docker Image (pull_request) Has been skipped
CI / Admin Web CI (pull_request) Failing after 38s
CI / YouTube Worker (pull_request) Has been skipped
CI / Deploy (pull_request) Has been skipped
PR → Build → WiFi/USB Deploy → LGTM / Build & Deploy to iPhone (WiFi/USB) (pull_request) Failing after 3m8s
PR → Build → WiFi/USB Deploy → LGTM / Wait for LGTM comment (pull_request) Has been skipped

This commit is contained in:
Millian Lamiaux
2026-07-13 14:15:32 +02:00
parent 3dd044029e
commit 9cf7ea1f15
2 changed files with 20 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ jobs:
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Install Docker CLI
run: sudo apt-get update -qq && sudo apt-get install -y -qq docker.io
run: apt-get update -qq && apt-get install -y -qq docker.io
- name: Build admin-web image (no push)
env:
@@ -118,7 +118,7 @@ jobs:
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Install Docker CLI
run: sudo apt-get update -qq && sudo apt-get install -y -qq docker.io
run: apt-get update -qq && apt-get install -y -qq docker.io
- name: Login to Gitea registry
# Secret referenced via env (never inline in the run command) so it

View File

@@ -472,6 +472,23 @@ check_actions_pinned() {
fi
}
# --- workflow: no sudo (runner Gitea ubuntu-latest = root, pas de binaire sudo) -- #
check_no_sudo() {
local f=".github/workflows/admin-web-docker.yml"
local label="workflow contains no 'sudo' (runner Gitea ubuntu-latest is root without sudo)"
if [[ ! -f "$f" ]]; then
fail "$label" "file missing"
return
fi
local count
count=$(grep -Ec '\bsudo\b' "$f" || true)
if [[ "$count" -eq 0 ]]; then
pass "$label"
else
fail "$label" "found $count occurrence(s) of 'sudo'"
fi
}
# --- git context --------------------------------------------------- #
check_git_branch() {
local label="current branch = feat/admin-web-docker"
@@ -643,6 +660,7 @@ check_push_tags
check_forbidden_secrets
check_buildargs_source
check_actions_pinned
check_no_sudo
check_git_branch
check_git_commit_prefix
# PR build-validation feature checks