fix: replace github-release plugin with direct curl API call
The github-release plugin was incorrectly detecting and using the Gitea API instead of GitHub's API. Replaced with direct curl command that explicitly calls GitHub API to create releases. This approach: - Uses curlimages/curl image for lightweight execution - Directly calls GitHub API v3 with proper authentication - Avoids any auto-detection issues from the plugin - Creates releases with full markdown formatting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+25
-45
@@ -110,53 +110,33 @@ steps:
|
|||||||
|
|
||||||
# -------- NEW: Create GitHub Release --------
|
# -------- NEW: Create GitHub Release --------
|
||||||
- name: github-release
|
- name: github-release
|
||||||
image: plugins/github-release
|
image: curlimages/curl:latest
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
environment:
|
environment:
|
||||||
PLUGIN_API_KEY:
|
GITHUB_TOKEN:
|
||||||
from_secret: GITHUB_TOKEN
|
from_secret: GITHUB_TOKEN
|
||||||
DRONE_REMOTE_URL: https://github.com/the-luap/picpeak.git
|
commands:
|
||||||
settings:
|
- |
|
||||||
api_key:
|
# Create release payload
|
||||||
from_secret: GITHUB_TOKEN
|
cat > release.json <<EOF
|
||||||
repo: the-luap/picpeak
|
{
|
||||||
title: "PicPeak ${DRONE_TAG}"
|
"tag_name": "${DRONE_TAG}",
|
||||||
prerelease: false
|
"target_commitish": "main",
|
||||||
overwrite: true
|
"name": "PicPeak ${DRONE_TAG}",
|
||||||
note: |
|
"body": "# PicPeak ${DRONE_TAG}\n\n## 🐳 Docker Images\n\nThis release includes Docker images published to GitHub Container Registry:\n\n\`\`\`bash\n# Backend\ndocker pull ghcr.io/the-luap/picpeak-backend:${DRONE_TAG}\ndocker pull ghcr.io/the-luap/picpeak-backend:latest\n\n# Frontend\ndocker pull ghcr.io/the-luap/picpeak-frontend:${DRONE_TAG}\ndocker pull ghcr.io/the-luap/picpeak-frontend:latest\n\`\`\`\n\n## 📦 What's New\n\nSee the [README](https://github.com/the-luap/picpeak#readme) for features and documentation.\n\n## 🚀 Quick Start\n\n\`\`\`bash\n# Clone and deploy\ngit clone https://github.com/the-luap/picpeak.git\ncd picpeak\n\n# Use the tagged version\ndocker-compose -f docker-compose.prod.yml up -d\n\`\`\`\n\n---\n\nFor detailed deployment instructions, see the [Deployment Guide](https://github.com/the-luap/picpeak/blob/main/DEPLOYMENT.md).",
|
||||||
# PicPeak ${DRONE_TAG}
|
"draft": false,
|
||||||
|
"prerelease": false
|
||||||
## 🐳 Docker Images
|
}
|
||||||
|
EOF
|
||||||
This release includes Docker images published to GitHub Container Registry:
|
- |
|
||||||
|
# Create the release on GitHub
|
||||||
```bash
|
curl -X POST \
|
||||||
# Backend
|
-H "Accept: application/vnd.github+json" \
|
||||||
docker pull ghcr.io/the-luap/picpeak-backend:${DRONE_TAG}
|
-H "Authorization: Bearer $GITHUB_TOKEN" \
|
||||||
docker pull ghcr.io/the-luap/picpeak-backend:latest
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
https://api.github.com/repos/the-luap/picpeak/releases \
|
||||||
# Frontend
|
-d @release.json
|
||||||
docker pull ghcr.io/the-luap/picpeak-frontend:${DRONE_TAG}
|
|
||||||
docker pull ghcr.io/the-luap/picpeak-frontend:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## 📦 What's New
|
|
||||||
|
|
||||||
See the [README](https://github.com/the-luap/picpeak#readme) for features and documentation.
|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Clone and deploy
|
|
||||||
git clone https://github.com/the-luap/picpeak.git
|
|
||||||
cd picpeak
|
|
||||||
|
|
||||||
# Use the tagged version
|
|
||||||
docker-compose -f docker-compose.prod.yml up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
For detailed deployment instructions, see the [Deployment Guide](https://github.com/the-luap/picpeak/blob/main/DEPLOYMENT.md).
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
|
|||||||
Reference in New Issue
Block a user