Update Workflow #108
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: Build Component | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Compile for main | |
if: github.ref == 'refs/heads/main' | |
uses: esphome/[email protected] | |
with: | |
yaml-file: .github/example-project-main.yaml | |
version: latest | |
- name: Compile for dev | |
if: github.ref != 'refs/heads/main' | |
uses: esphome/[email protected] | |
with: | |
yaml-file: .github/example-project-dev.yaml | |
version: latest | |
- name: Send Discord failure notification | |
if: failure() | |
uses: appleboy/discord-action@master | |
with: | |
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} | |
color: "#FF6961" | |
message: "The Nuki Lock component build failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" |