Skip to content

slack

slack #119

Workflow file for this run

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