.gitea/workflows/build-and-push.yaml aktualisiert
All checks were successful
/ release-and-build (push) Successful in 2m57s
All checks were successful
/ release-and-build (push) Successful in 2m57s
This commit is contained in:
@@ -373,9 +373,21 @@ jobs:
|
|||||||
git config --local user.name "Gitea Action"
|
git config --local user.name "Gitea Action"
|
||||||
git add VERSION.history README.md docker-compose.yml
|
git add VERSION.history README.md docker-compose.yml
|
||||||
git diff --quiet && git diff --staged --quiet || git commit -m "${{ env.FINAL_MSG }} [skip ci]"
|
git diff --quiet && git diff --staged --quiet || git commit -m "${{ env.FINAL_MSG }} [skip ci]"
|
||||||
|
|
||||||
|
# Das Tag lokal auf den neuen Commit setzen
|
||||||
git tag -f "v${{ steps.prep.outputs.docker_tag }}"
|
git tag -f "v${{ steps.prep.outputs.docker_tag }}"
|
||||||
git push origin main
|
|
||||||
|
# Logik: Wohin wird gepusht?
|
||||||
|
if [[ "${{ gitea.ref }}" == refs/tags/* ]]; then
|
||||||
|
echo "🏷️ Build wurde aus einem Tag getriggert."
|
||||||
|
echo "Pulshe NUR das aktualisierte Tag zurück..."
|
||||||
git push -f origin "v${{ steps.prep.outputs.docker_tag }}"
|
git push -f origin "v${{ steps.prep.outputs.docker_tag }}"
|
||||||
|
else
|
||||||
|
echo "🌿 Build wurde aus einem Branch oder per Schedule getriggert (${{ gitea.ref_name }})."
|
||||||
|
echo "Pushe Änderungen in den Branch und setze das Tag..."
|
||||||
|
git push origin HEAD:${{ gitea.ref_name }}
|
||||||
|
git push -f origin "v${{ steps.prep.outputs.docker_tag }}"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Cleanup Temporary Tags on Docker Hub
|
- name: Cleanup Temporary Tags on Docker Hub
|
||||||
if: steps.check_changes.outputs.should_build == 'true' && contains(steps.prep.outputs.push_targets, 'dockerhub')
|
if: steps.check_changes.outputs.should_build == 'true' && contains(steps.prep.outputs.push_targets, 'dockerhub')
|
||||||
|
|||||||
Reference in New Issue
Block a user