Discord webhook ci
This commit is contained in:
parent
db9dc8f305
commit
12f2ee5161
1 changed files with 50 additions and 13 deletions
63
.drone.yml
63
.drone.yml
|
@ -1,8 +1,7 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
|
||||
workspace:
|
||||
path: /drone/svelte-sharg
|
||||
name: test
|
||||
|
||||
# Check if the game builds
|
||||
# If yes, test if everything is nice
|
||||
|
@ -46,6 +45,18 @@ steps:
|
|||
depends_on:
|
||||
- build-game
|
||||
- build-pwa
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: build
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
|
||||
workspace:
|
||||
path: /drone/svelte-sharg
|
||||
|
||||
steps:
|
||||
- name: deploy (production)
|
||||
image: dockette/vercel
|
||||
environment:
|
||||
|
@ -54,14 +65,10 @@ steps:
|
|||
VERCEL_SCOPE:
|
||||
from_secret: VERCEL_SCOPE
|
||||
commands:
|
||||
- vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c --prod
|
||||
- export VERCEL_BUILD_URL=$(vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c --prod)
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
depends_on:
|
||||
- prettier
|
||||
- eslint
|
||||
- type-check
|
||||
- name: deploy (preview)
|
||||
image: dockette/vercel
|
||||
environment:
|
||||
|
@ -70,12 +77,42 @@ steps:
|
|||
VERCEL_SCOPE:
|
||||
from_secret: VERCEL_SCOPE
|
||||
commands:
|
||||
- vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c
|
||||
- export VERCEL_BUILD_URL=$(vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c)
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
depends_on:
|
||||
- prettier
|
||||
- eslint
|
||||
- type-check
|
||||
|
||||
---
|
||||
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.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n"
|
||||
webhook_id:
|
||||
from_secret: discord_webhook_id_private
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_token_private
|
||||
depends_on:
|
||||
- sync
|
||||
- name: discord notification (dev server)
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n"
|
||||
webhook_id:
|
||||
from_secret: discord_webhook_id_dev_server
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_token_dev_server
|
||||
depends_on:
|
||||
- sync
|
||||
|
|
Reference in a new issue