add latest -> previous step
Build and push image / build (push) Canceled after 12s

This commit is contained in:
2026-09-27 07:16:21 +01:00
parent 1e3a749d7d
commit 5e8abfd6ef
+12 -3
View File
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
workflow_dispatch:
env:
IMAGE: code.aneur.in/cloud/webfetch-mcpo-docker
@@ -22,12 +23,20 @@ jobs:
uses: docker/login-action@v3
with:
registry: code.aneur.in
username: ${{ secrets.PACKAGE_REGISTRY_USER }}
password: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
username: ${{ gitea.actor }}
password: ${{ secrets.BUILD_API_TOKEN }}
- name: Promote current "latest" to "previous"
run: |
if docker buildx imagetools inspect "$IMAGE:latest" >/dev/null 2>&1; then
docker buildx imagetools create -t "$IMAGE:previous" "$IMAGE:latest"
else
echo "No existing :latest to promote; skipping."
fi
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.IMAGE }}:latest
tags: code.aneur.in/${{ gitea.repository }}:latest