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
All checks were successful
Update Community Skins README / Full CI/CD Pipeline (push) Successful in 4s
This commit is contained in:
@@ -87,7 +87,7 @@ jobs:
|
|||||||
echo "[$repo_counter/$repo_total] Processing Repository: $owner/$repo"
|
echo "[$repo_counter/$repo_total] Processing Repository: $owner/$repo"
|
||||||
|
|
||||||
tmpdir=$(mktemp -d)
|
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"
|
cd "$tmpdir"
|
||||||
mkdir -p .gitea/workflows
|
mkdir -p .gitea/workflows
|
||||||
cp "/workspace/osc/skins/template-repo/${{ env.TEMPLATE_REL_PATH }}" .gitea/workflows/ci.yml
|
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
|
git add .gitea/workflows/ci.yml
|
||||||
|
|
||||||
if ! git diff --cached --quiet; then
|
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 commit -m "Update CI"
|
||||||
git push origin HEAD:main
|
git push origin HEAD:main --tags --force
|
||||||
echo " → Updated and pushed $owner/$repo"
|
echo " → Updated and pushed $owner/$repo"
|
||||||
else
|
else
|
||||||
echo " → No changes detected for $owner/$repo"
|
echo " → No changes detected for $owner/$repo"
|
||||||
|
|||||||
Reference in New Issue
Block a user