This commit is contained in:
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE: code.aneur.in/cloud/webfetch-mcpo-docker
|
IMAGE: code.aneur.in/cloud/webfetch-mcpo-docker
|
||||||
@@ -22,12 +23,20 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: code.aneur.in
|
registry: code.aneur.in
|
||||||
username: ${{ secrets.PACKAGE_REGISTRY_USER }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ secrets.PACKAGE_REGISTRY_TOKEN }}
|
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
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ env.IMAGE }}:latest
|
tags: code.aneur.in/${{ gitea.repository }}:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user