Nomad changes again
Some checks failed
Deploy continuwuity to Nomad / nomad job run continuwuity (push) Failing after 59s
Some checks failed
Deploy continuwuity to Nomad / nomad job run continuwuity (push) Failing after 59s
This commit is contained in:
@@ -42,6 +42,30 @@ jobs:
|
||||
- name: Validate job
|
||||
run: nomad job validate continuwuity.hcl
|
||||
|
||||
- name: Mirror image to registry.i80.dk
|
||||
env:
|
||||
UPSTREAM: forgejo.ellis.link/continuwuation/continuwuity:latest
|
||||
IMAGE: registry.i80.dk/continuwuity
|
||||
REGISTRY: registry.i80.dk
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
run: |
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
echo "❌ docker not found on the runner — needed to mirror the image."
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "$REGISTRY_USER" ]; then
|
||||
echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
|
||||
else
|
||||
echo "ℹ️ REGISTRY_USER not set — assuming anonymous/pre-configured push to $REGISTRY"
|
||||
fi
|
||||
docker pull "$UPSTREAM"
|
||||
docker tag "$UPSTREAM" "$IMAGE:latest"
|
||||
docker tag "$UPSTREAM" "$IMAGE:${{ github.sha }}"
|
||||
docker push "$IMAGE:latest"
|
||||
docker push "$IMAGE:${{ github.sha }}"
|
||||
echo "✅ mirrored $UPSTREAM -> $IMAGE:latest (+ :${{ github.sha }} for rollback)"
|
||||
|
||||
- name: Plan (diff, non-blocking)
|
||||
run: |
|
||||
# plan exit codes: 0 = no changes, 1 = changes will be made, anything else = error
|
||||
|
||||
Reference in New Issue
Block a user