fix: use plugins/github-release for Drone CI/CD
- Replace manual curl approach with plugins/github-release - Fixes shell parsing issues with multiline strings - Properly passes GITHUB_TOKEN via api_key setting - Uses YAML multiline string (|) for release notes - Cleaner and more reliable approach 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+40
-20
@@ -110,29 +110,49 @@ steps:
|
|||||||
|
|
||||||
# -------- NEW: Create GitHub Release --------
|
# -------- NEW: Create GitHub Release --------
|
||||||
- name: github-release
|
- name: github-release
|
||||||
image: curlimages/curl:latest
|
image: plugins/github-release
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
environment:
|
settings:
|
||||||
GITHUB_TOKEN:
|
api_key:
|
||||||
from_secret: GITHUB_TOKEN
|
from_secret: GITHUB_TOKEN
|
||||||
commands:
|
files: []
|
||||||
- >
|
title: PicPeak ${DRONE_TAG}
|
||||||
echo '{
|
note: |
|
||||||
"tag_name": "'${DRONE_TAG}'",
|
# PicPeak ${DRONE_TAG}
|
||||||
"target_commitish": "main",
|
|
||||||
"name": "PicPeak '${DRONE_TAG}'",
|
## 🐳 Docker Images
|
||||||
"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).",
|
|
||||||
"draft": false,
|
This release includes Docker images published to GitHub Container Registry:
|
||||||
"prerelease": false
|
|
||||||
}' > /tmp/release.json
|
```bash
|
||||||
- >
|
# Backend
|
||||||
curl -X POST
|
docker pull ghcr.io/the-luap/picpeak-backend:${DRONE_TAG}
|
||||||
-H "Accept: application/vnd.github+json"
|
docker pull ghcr.io/the-luap/picpeak-backend:latest
|
||||||
-H "Authorization: Bearer ${GITHUB_TOKEN}"
|
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28"
|
# Frontend
|
||||||
https://api.github.com/repos/the-luap/picpeak/releases
|
docker pull ghcr.io/the-luap/picpeak-frontend:${DRONE_TAG}
|
||||||
-d @/tmp/release.json
|
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