-
Notifications
You must be signed in to change notification settings - Fork 69
48 lines (47 loc) · 1.66 KB
/
dev-notifier.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
name: Development Build Notifier
on:
workflow_run:
workflows:
- Vagrant Development Build (AppImage)
- Vagrant Development Build (Arch Linux)
- Vagrant Development Builds
- Vagrant Development Build (DEB)
- Vagrant Development Build (DMG)
- Vagrant Development Build (RPM)
- Vagrant Development Build (MSI)
types:
- completed
jobs:
failed:
if: github.event.workflow_run.conclusion == 'failure'
runs-on: ['self-hosted', 'ondemand', 'linux', 'type=t3.small']
permissions:
id-token: write
contents: read
steps:
- name: Authentication
id: vault-auth
run: vault-auth
- name: Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets:
kv/data/teams/vagrant/slack webhook;
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Send Notification
run: |
. .ci/load-ci.sh || exit
slack -m "$(printf "Vagrant development build failed\n\n- <%s|%s>" "${WORKFLOW_URL}" "${WORKFLOW_NAME}")"
env:
SLACK_WEBHOOK: ${{ steps.secrets.outputs.webhook }}
SLACK_CHANNEL: '#feed-vagrant'
SLACK_USERNAME: Vagrant Builder
SLACK_TITLE: '⚠️ Vagrant Development Build ⚠️'
SLACK_STATE: error
WORKFLOW_NAME: ${{ github.event.workflow_run.name }}
WORKFLOW_URL: ${{ github.event.workflow_run.html_url }}