-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.4 KB
/
fly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
outputs:
gitrev: ${{ steps.gitparse.outputs.rev }}
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
- id: gitparse
run: echo "rev=`git rev-parse --short ${{ github.sha }}`" >> $GITHUB_OUTPUT
notify:
needs: [deploy]
name: Notify slack
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "new version <${{ github.event.head_commit.url }}|${{ needs.deploy.outputs.gitrev }}> landed on <https://moonbase.mw.zone|moonbase> refer to the <https://moonbase.mw.zone/docs|docs>"
},
"accessory": {
"type": "image",
"image_url": "https://moonbase.mw.zone/assets/logo.png",
"alt_text": "moonbase logo"
}
}
]
}