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

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

View File

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