ci: point Docker registry at internal Gitea (10.5.0.195:3000)
CI / Build Native (push) Successful in 6m17s
CI / Build Native (push) Successful in 6m17s
Cut the dependency on the public hostname gitea.danielarroyo.cl and push straight to the LAN Gitea instance. Internal Gitea is plain HTTP, so the docker daemon on the LXC needs 'insecure-registries' set, and the gitea-runner-lxc has to be re-registered against the new URL (separate manual steps; not in this repo). - ci.yml: docker login, both docker tag, both push_with_retry, and docker logout now target 10.5.0.195:3000 - compose.yaml: image URL switched to 10.5.0.195:3000 The CI workflow itself, the Dockerfile, and the build command are unchanged - only the registry target moved.
This commit is contained in:
@@ -82,11 +82,11 @@ jobs:
|
|||||||
echo "=== Build Docker image ==="
|
echo "=== Build Docker image ==="
|
||||||
docker buildx build -t shot-crafter-calculator:ci .
|
docker buildx build -t shot-crafter-calculator:ci .
|
||||||
echo "=== Login to Gitea Registry ==="
|
echo "=== Login to Gitea Registry ==="
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.danielarroyo.cl -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login 10.5.0.195:3000 -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||||
SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7)
|
SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7)
|
||||||
echo "=== Tag ==="
|
echo "=== Tag ==="
|
||||||
docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest
|
docker tag shot-crafter-calculator:ci 10.5.0.195:3000/proyectos/shot-crafter-calculator:latest
|
||||||
docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${SHORT_SHA}
|
docker tag shot-crafter-calculator:ci 10.5.0.195:3000/proyectos/shot-crafter-calculator:${SHORT_SHA}
|
||||||
|
|
||||||
push_with_retry() {
|
push_with_retry() {
|
||||||
local ref="$1"
|
local ref="$1"
|
||||||
@@ -105,8 +105,8 @@ jobs:
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
push_with_retry "gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest"
|
push_with_retry "10.5.0.195:3000/proyectos/shot-crafter-calculator:latest"
|
||||||
push_with_retry "gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${SHORT_SHA}"
|
push_with_retry "10.5.0.195:3000/proyectos/shot-crafter-calculator:${SHORT_SHA}"
|
||||||
echo "=== Logout ==="
|
echo "=== Logout ==="
|
||||||
docker logout gitea.danielarroyo.cl
|
docker logout 10.5.0.195:3000
|
||||||
echo "=== Done ==="
|
echo "=== Done ==="
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
shot-crafter:
|
shot-crafter:
|
||||||
image: gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest
|
image: 10.5.0.195:3000/proyectos/shot-crafter-calculator:latest
|
||||||
container_name: shot-crafter
|
container_name: shot-crafter
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user