Development Build Notifier #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |