add action.yml/sort environment
This commit is contained in:
parent
8220961b60
commit
e8eab2c120
23
action.yml
Normal file
23
action.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
name: 'Ntfy notification'
|
||||
description: 'Notifies job status via ntfy'
|
||||
author: 'lobo'
|
||||
inputs:
|
||||
host:
|
||||
description: 'Ntfy host'
|
||||
required: true
|
||||
topic:
|
||||
description: 'Ntfy topic'
|
||||
required: true
|
||||
status:
|
||||
description: 'Job status. Use ${{ job.status }} for most cases'
|
||||
required: true
|
||||
default: '${{ job.status }}'
|
||||
user:
|
||||
description: 'Username for ntfy server'
|
||||
required: true # should be false, but we'll do authenticated sessions only for now
|
||||
password:
|
||||
description: 'Password for ntfy server'
|
||||
required: true # should be false, but we'll do authenticated sessions only for now
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
|
@ -1,5 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
env
|
||||
|
||||
env | sort
|
||||
#GITHUB_RUN_NUMBER
|
||||
# Job status: success/failure/cancelled
|
||||
|
||||
# if: success()
|
||||
# run: |
|
||||
# curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \
|
||||
# -H 'Title: Job Succeeded. ${{ github.repository }}/${{ github.ref }}' \
|
||||
# -H "Tags: +1" \
|
||||
# -d 'Job succeeded. See '$GITHUB_SERVER_URL'/${{ github.repository }}/actions/runs/${{ github.run_number }} for details' \
|
||||
# '${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}'
|
||||
# - name: Failure Notification
|
||||
# if: failure()
|
||||
# run: |
|
||||
# curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \
|
||||
# -H "Priority: high" \
|
||||
# -H 'Title: Job FAILED. ${{ github.repository }}/${{ github.ref }}' \
|
||||
# -H "Tags: warning" \
|
||||
# -d 'Job failed. See '$GITHUB_SERVER_URL'/${{ github.repository }}/actions/runs/${{ github.run_number }} for details' \
|
||||
# '${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}'
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user