delete the latest tag if changes are to be found
All checks were successful
Update Community Skins README / Full CI/CD Pipeline (push) Successful in 4s

This commit is contained in:
2025-06-07 12:37:18 +02:00
parent 77337d63e3
commit 8c6c81b910

View File

@@ -87,7 +87,7 @@ jobs:
echo "[$repo_counter/$repo_total] Processing Repository: $owner/$repo"
tmpdir=$(mktemp -d)
git clone --quiet "https://${{ secrets.TOKEN }}@${{ vars.CONTAINER_REGISTRY }}/${owner}/${repo}.git" --depth 1 "$tmpdir"
git clone --quiet "https://${{ secrets.TOKEN }}@${{ vars.CONTAINER_REGISTRY }}/${owner}/${repo}.git" "$tmpdir"
cd "$tmpdir"
mkdir -p .gitea/workflows
cp "/workspace/osc/skins/template-repo/${{ env.TEMPLATE_REL_PATH }}" .gitea/workflows/ci.yml
@@ -96,8 +96,12 @@ jobs:
git add .gitea/workflows/ci.yml
if ! git diff --cached --quiet; then
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || true)
if [ -n "$latest_tag" ]; then
git tag -d "$latest_tag" || true
fi
git commit -m "Update CI"
git push origin HEAD:main
git push origin HEAD:main --tags --force
echo " → Updated and pushed $owner/$repo"
else
echo " → No changes detected for $owner/$repo"