ci: fix docker restart for non-systemd runners
Some checks failed
CI/CD / lint (push) Successful in 41s
CI/CD / test (push) Successful in 54s
CI/CD / typecheck (push) Successful in 10m51s
CI/CD / build (push) Successful in 1m20s
CI/CD / docker (push) Failing after 8s
CI/CD / publish-rpm (push) Successful in 38s
CI/CD / deploy (push) Has been skipped
Some checks failed
CI/CD / lint (push) Successful in 41s
CI/CD / test (push) Successful in 54s
CI/CD / typecheck (push) Successful in 10m51s
CI/CD / build (push) Successful in 1m20s
CI/CD / docker (push) Failing after 8s
CI/CD / publish-rpm (push) Successful in 38s
CI/CD / deploy (push) Has been skipped
Gitea Act Runner containers don't use systemd. Fall back to service/init.d for restarting dockerd after configuring insecure registry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -148,7 +148,12 @@ jobs:
|
||||
run: |
|
||||
sudo mkdir -p /etc/docker
|
||||
echo '{"insecure-registries":["${{ env.GITEA_REGISTRY }}"]}' | sudo tee /etc/docker/daemon.json
|
||||
# Restart docker - try systemctl first, fall back to service for non-systemd runners
|
||||
if command -v systemctl &>/dev/null && systemctl is-system-running &>/dev/null; then
|
||||
sudo systemctl restart docker
|
||||
else
|
||||
sudo service docker restart || sudo /etc/init.d/docker restart
|
||||
fi
|
||||
|
||||
- name: Login to Gitea container registry
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user