Switch to custom PO action

This commit is contained in:
Luke Tainton 2025-03-23 20:52:33 +00:00
parent 760677ad0b
commit 391f3d91d5
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo
2 changed files with 26 additions and 32 deletions

View File

@ -22,18 +22,17 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Notify Build Start
uses: umahmood/pushover-actions@main
steps:
- name: "[ON RUNNER] Notify Build Start"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.0
env:
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER: ${{ secrets.PUSHOVER_USER_TOKEN }}
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
status: ${{ job.status }}
message: "Deploying stack ${{ gitea.repository }}"
title: 'Stack Deployment Started'
message: "${{ gitea.event.head_commit.message }}"
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Deployment'
url_title: 'View Logs'
- name: "[ON RUNNER] Checkout the repo"
uses: actions/checkout@v4
@ -85,15 +84,13 @@ jobs:
cd ${{ env.project_folder }}
docker compose --env-file .env up --detach
- name: Notify Build End
uses: umahmood/pushover-actions@main
if: ${{ !cancelled() }}
- name: "[ON RUNNER] Notify Build End"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.0
env:
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER: ${{ secrets.PUSHOVER_USER_TOKEN }}
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
status: ${{ job.status }}
title: "Stack Deployment ${{ job.status }}"
message: "${{ gitea.event.head_commit.message }}"
message: "Deployed stack ${{ gitea.repository }}"
title: 'Stack Deployment ${{ job.status }}'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'

View File

@ -23,17 +23,16 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Notify Build Start
uses: umahmood/pushover-actions@main
- name: "[ON RUNNER] Notify Build Start"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.0
env:
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER: ${{ secrets.PUSHOVER_USER_TOKEN }}
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
status: ${{ job.status }}
title: 'Stack Removal Started'
message: "Removing stack ${{ gitea.repository }}"
title: 'Stack Removal Started'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Deployment'
url_title: 'View Logs'
- name: "[ON RUNNER] Set project variables"
run: |
@ -53,16 +52,14 @@ jobs:
docker compose --env-file .env down
cd ..
rm -rf ${{ env.project_folder }}
- name: Notify Build End
uses: umahmood/pushover-actions@main
if: ${{ !cancelled() }}
- name: "[ON RUNNER] Notify Build End"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.0
env:
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER: ${{ secrets.PUSHOVER_USER_TOKEN }}
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
status: ${{ job.status }}
title: "Stack Removal ${{ job.status }}"
message: "Stack ${{ gitea.repository }} removed"
message: "Removed stack ${{ gitea.repository }}"
title: 'Stack Removal ${{ job.status }}'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'