This commit is contained in:
parent
c4dbfa6d6c
commit
3152e71ce7
1 changed files with 47 additions and 66 deletions
109
.drone.yml
109
.drone.yml
|
@ -78,81 +78,62 @@ steps:
|
|||
from_secret: VERCEL_SCOPE
|
||||
commands:
|
||||
- export VERCEL_BUILD_URL=$(vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c)
|
||||
- echo VERCEL_BUILD_URL=$VERCEL_BUILD_URL >> .env
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notify
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
steps:
|
||||
- name: sync
|
||||
image: alpine
|
||||
- name: discord notification (private)
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
message: |
|
||||
{{#success build.status}}
|
||||
```
|
||||
✅ Build #{{build.number}} of `{{repo.name}}` succeeded.
|
||||
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
-------------------------------------------------------
|
||||
{{commit.message}}
|
||||
-------------------------------------------------------
|
||||
🌐 {{ build.link }}```
|
||||
{{else}}
|
||||
```
|
||||
❌ Build #{{build.number}} of `{{repo.name}}` failed.
|
||||
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
-------------------------------------------------------
|
||||
{{commit.message}}
|
||||
-------------------------------------------------------
|
||||
|
||||
🌐 {{ build.link }}```
|
||||
{{/success}}"
|
||||
webhook_id:
|
||||
environment:
|
||||
WEBHOOK_ID_PRIVATE:
|
||||
from_secret: discord_webhook_id_private
|
||||
webhook_token:
|
||||
WEBHOOK_TOKEN_PRIVATE:
|
||||
from_secret: discord_webhook_token_private
|
||||
commands:
|
||||
- source .env
|
||||
- |-
|
||||
export MESSAGE='{{#success build.status}}
|
||||
✅ Build #{{build.number}} of `{{repo.name}}` succeeded.{{else}}
|
||||
❌ Build #{{build.number}} of `{{repo.name}}` failed.{{/success}}
|
||||
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
🌐 {{ build.link }}
|
||||
🌐 '$VERCEL_BUILD_URL
|
||||
- >-
|
||||
drone-discord
|
||||
--webhook-id $WEBHOOK_ID_PRIVATE
|
||||
--webhook-token $WEBHOOK_TOKEN_PRIVATE
|
||||
depends_on:
|
||||
- sync
|
||||
- deploy (production)
|
||||
- deploy (preview)
|
||||
- name: discord notification (dev server)
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
message: |
|
||||
{{#success build.status}}
|
||||
```
|
||||
✅ Build #{{build.number}} of `{{repo.name}}` succeeded.
|
||||
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
-------------------------------------------------------
|
||||
{{commit.message}}
|
||||
-------------------------------------------------------
|
||||
🌐 {{ build.link }}```
|
||||
{{else}}
|
||||
```
|
||||
❌ Build #{{build.number}} of `{{repo.name}}` failed.
|
||||
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
-------------------------------------------------------
|
||||
{{commit.message}}
|
||||
-------------------------------------------------------
|
||||
|
||||
🌐 {{ build.link }}```
|
||||
{{/success}}"
|
||||
webhook_id:
|
||||
environment:
|
||||
WEBHOOK_ID_DEV_SERVER:
|
||||
from_secret: discord_webhook_id_dev_server
|
||||
webhook_token:
|
||||
WEBHOOK_TOKEN_DEV_SERVER:
|
||||
from_secret: discord_webhook_token_dev_server
|
||||
commands:
|
||||
- source .env
|
||||
- |-
|
||||
export MESSAGE='{{#success build.status}}
|
||||
✅ Build #{{build.number}} of `{{repo.name}}` succeeded.{{else}}
|
||||
❌ Build #{{build.number}} of `{{repo.name}}` failed.{{/success}}
|
||||
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
🌐 {{ build.link }}
|
||||
🌐 '$VERCEL_BUILD_URL
|
||||
- >-
|
||||
drone-discord
|
||||
--webhook-id $WEBHOOK_ID_DEV_SERVER
|
||||
--webhook-token $WEBHOOK_TOKEN_DEV_SERVER
|
||||
depends_on:
|
||||
- sync
|
||||
- deploy (production)
|
||||
- deploy (preview)
|
||||
|
|
Reference in a new issue