Skip to content

Commit

Permalink
WIP: ntfy after builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Oct 24, 2023
1 parent 85b027d commit a117ac6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,32 @@ jobs:
-H 'Content-Type: application/json' \
--data '{"ForceOverwrite": true}' \
"${{ secrets.APTLY_API }}/publish/${{ needs.meta.outputs.aptly_publish_prefix }}/${{ needs.meta.outputs.aptly_dist }}?_async=true"
ntfy:
name: Ntfy
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: meta
steps:
- name: Send success notification
uses: niniyas/ntfy-action@master
if: ${{ success() && (needs.meta.outputs.is_release == 'true' || needs.meta.outputs.is_prerelease == 'true') }}
with:
url: 'https://ntfy.cdzombak.net'
topic: 'gha-builds'
priority: 3
headers: '{"authorization": "Bearer ${{ secrets.NTFY_TOKEN }}"}'
tags: white_check_mark
title: ${{ github.event.repository.name }} ${{ needs.meta.outputs.bin_version }} available
details: ${{ github.event.repository.name }} version ${{ needs.meta.outputs.bin_version }} is now available.
- name: Send failure notification
uses: niniyas/ntfy-action@master
if: ${{ failure() }}
with:
url: 'https://ntfy.cdzombak.net'
topic: 'gha-builds'
priority: 3
headers: '{"authorization": "Bearer ${{ secrets.NTFY_TOKEN }}"}'
tags: no_entry
title: ${{ github.event.repository.name }} ${{ needs.meta.outputs.bin_version }} build failed
details: Build failed for ${{ github.event.repository.name }} version ${{ needs.meta.outputs.bin_version }}.

0 comments on commit a117ac6

Please sign in to comment.