Update .gitea/workflows/deploy-ci.yaml
All checks were successful
Update Community Skins README / Full CI/CD Pipeline (push) Successful in 3s
All checks were successful
Update Community Skins README / Full CI/CD Pipeline (push) Successful in 3s
This commit is contained in:
@@ -96,10 +96,20 @@ jobs:
|
||||
git add .gitea/workflows/ci.yml
|
||||
|
||||
if ! git diff --cached --quiet; then
|
||||
git fetch --tags >/dev/null 2>&1
|
||||
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || true)
|
||||
if [ -n "$latest_tag" ] && [ "$latest_tag" != "v1.0.0" ]; then
|
||||
git push origin --delete tag "$latest_tag" >/dev/null 2>&1 || true
|
||||
git tag -d "$latest_tag" >/dev/null 2>&1 || true
|
||||
latest_tag=$(echo "$latest_tag" | xargs)
|
||||
echo "Latest tag detected: '$latest_tag'"
|
||||
if [ -n "$latest_tag" ]; then
|
||||
if [ "$latest_tag" = "v1.0.0" ]; then
|
||||
echo "Never delete v1.0.0"
|
||||
else
|
||||
echo "Deleting tag '$latest_tag' (not v1.0.0)..."
|
||||
git push origin --delete tag "$latest_tag" >/dev/null 2>&1 || true
|
||||
git tag -d "$latest_tag" >/dev/null 2>&1 || true
|
||||
fi
|
||||
else
|
||||
echo "No tags found to consider for deletion."
|
||||
fi
|
||||
git commit -m "Update CI" --quiet
|
||||
git push origin HEAD:main --tags --force >/dev/null 2>&1
|
||||
@@ -116,7 +126,6 @@ jobs:
|
||||
done < "$valid_repos_file"
|
||||
|
||||
rm "$valid_repos_file"
|
||||
|
||||
rm -rf "$tmpdir"
|
||||
echo " ✓ Completed $owner/$repo"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user