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
|
git add .gitea/workflows/ci.yml
|
||||||
|
|
||||||
if ! git diff --cached --quiet; then
|
if ! git diff --cached --quiet; then
|
||||||
|
git fetch --tags >/dev/null 2>&1
|
||||||
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || true)
|
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || true)
|
||||||
if [ -n "$latest_tag" ] && [ "$latest_tag" != "v1.0.0" ]; then
|
latest_tag=$(echo "$latest_tag" | xargs)
|
||||||
git push origin --delete tag "$latest_tag" >/dev/null 2>&1 || true
|
echo "Latest tag detected: '$latest_tag'"
|
||||||
git tag -d "$latest_tag" >/dev/null 2>&1 || true
|
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
|
fi
|
||||||
git commit -m "Update CI" --quiet
|
git commit -m "Update CI" --quiet
|
||||||
git push origin HEAD:main --tags --force >/dev/null 2>&1
|
git push origin HEAD:main --tags --force >/dev/null 2>&1
|
||||||
@@ -116,7 +126,6 @@ jobs:
|
|||||||
done < "$valid_repos_file"
|
done < "$valid_repos_file"
|
||||||
|
|
||||||
rm "$valid_repos_file"
|
rm "$valid_repos_file"
|
||||||
|
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
echo " ✓ Completed $owner/$repo"
|
echo " ✓ Completed $owner/$repo"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user