Readme CI
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 12s
All checks were successful
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 12s
This commit is contained in:
@@ -72,12 +72,9 @@ jobs:
|
|||||||
echo "🌿 Creating branch: $BRANCH_NAME"
|
echo "🌿 Creating branch: $BRANCH_NAME"
|
||||||
git checkout -b "$BRANCH_NAME"
|
git checkout -b "$BRANCH_NAME"
|
||||||
git add README.md
|
git add README.md
|
||||||
git commit -m "Auto-update README with current k8s applications
|
git commit -m "Auto-update README with current k8s applications" \
|
||||||
|
-m "Generated by CI/CD workflow on $(date +%Y-%m-%d\ %H:%M:%S)" \
|
||||||
Generated by CI/CD workflow on $(date +%Y-%m-%d\ %H:%M:%S)
|
-m "This PR updates the README.md file with the current list of applications found in the k8s/ directory structure."
|
||||||
|
|
||||||
This PR updates the README.md file with the current list of applications
|
|
||||||
found in the k8s/ directory structure."
|
|
||||||
|
|
||||||
# Push branch to remote
|
# Push branch to remote
|
||||||
echo "📤 Pushing branch to remote..."
|
echo "📤 Pushing branch to remote..."
|
||||||
@@ -87,29 +84,22 @@ found in the k8s/ directory structure."
|
|||||||
echo "🔀 Creating Pull Request..."
|
echo "🔀 Creating Pull Request..."
|
||||||
|
|
||||||
PR_TITLE="Auto-update README with k8s applications"
|
PR_TITLE="Auto-update README with k8s applications"
|
||||||
PR_BODY="This PR automatically updates README.md based on the current k8s/ directory structure.
|
|
||||||
|
|
||||||
## Changes
|
# Create PR body
|
||||||
- Updated application list in README.md
|
cat > /tmp/pr_body.json <<EOF
|
||||||
- Applications are now synced with k8s/ folders
|
{
|
||||||
|
"title": "$PR_TITLE",
|
||||||
## Review
|
"body": "This PR automatically updates README.md based on the current k8s/ directory structure.\n\n## Changes\n- Updated application list in README.md\n- Applications are now synced with k8s/ folders\n\n## Review\nPlease review and merge if everything looks correct.\n\n---\n🤖 This PR was automatically generated by CI/CD workflow\n⏰ Generated at: $(date '+%Y-%m-%d %H:%M:%S')",
|
||||||
Please review and merge if everything looks correct.
|
"head": "$BRANCH_NAME",
|
||||||
|
"base": "main"
|
||||||
---
|
}
|
||||||
🤖 This PR was automatically generated by CI/CD workflow
|
EOF
|
||||||
⏰ Generated at: $(date +%Y-%m-%d\ %H:%M:%S)"
|
|
||||||
|
|
||||||
# Create PR via API
|
# Create PR via API
|
||||||
RESPONSE=$(curl -s -X POST \
|
RESPONSE=$(curl -s -X POST \
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{
|
-d @/tmp/pr_body.json \
|
||||||
\"title\": \"$PR_TITLE\",
|
|
||||||
\"body\": \"$PR_BODY\",
|
|
||||||
\"head\": \"$BRANCH_NAME\",
|
|
||||||
\"base\": \"main\"
|
|
||||||
}" \
|
|
||||||
"$GITEA_URL/api/v1/repos/$GITEA_OWNER/$GITEA_REPO/pulls")
|
"$GITEA_URL/api/v1/repos/$GITEA_OWNER/$GITEA_REPO/pulls")
|
||||||
|
|
||||||
# Extract PR number and URL from response
|
# Extract PR number and URL from response
|
||||||
|
|||||||
Reference in New Issue
Block a user