-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.09 KB
/
slack.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
name: slack
on:
push:
branches:
- main
paths:
# Build when there are changes in the directory that holds the component,
# or when this workflow file is changed
- 'slack/**'
- '.github/workflows/slack.yml'
schedule:
# A weekly build to pick up updates to the base container image
# A weekday at mid-day - when someone is likely to be working (avoid bank holidays)
- cron: "0 12 * * 2"
jobs:
deploy:
uses: davidcarboni/scloud/.github/workflows/typescript-lambda.yml@main
with:
lambdaName: ${{ vars.SLACK_LAMBDA }}
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
notify:
runs-on: ubuntu-latest
needs: deploy
if: always() && needs.deploy.result == 'failure'
steps:
- name: Notify Slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: Pingmyhouse build
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMOJI: ":github_octocat:"
SLACK_CHANNEL: build