gha-workflows/.gitea/workflows/docker-compose-remove.yml
Renovate [BOT] 691d3c563f chore(deps): update https://git.tainton.uk/actions/pushover-action action to v1.1.3 (#23)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://git.tainton.uk/actions/pushover-action](https://git.tainton.uk/actions/pushover-action) | action | patch | `v1.1.0` -> `v1.1.3` |

---

### Release Notes

<details>
<summary>actions/pushover-action (https://git.tainton.uk/actions/pushover-action)</summary>

### [`v1.1.3`](https://git.tainton.uk/actions/pushover-action/compare/v1.1.2...v1.1.3)

[Compare Source](https://git.tainton.uk/actions/pushover-action/compare/v1.1.2...v1.1.3)

### [`v1.1.2`](https://git.tainton.uk/actions/pushover-action/compare/v1.1.1...v1.1.2)

[Compare Source](https://git.tainton.uk/actions/pushover-action/compare/v1.1.1...v1.1.2)

### [`v1.1.1`](https://git.tainton.uk/actions/pushover-action/compare/v1.1.0...v1.1.1)

[Compare Source](https://git.tainton.uk/actions/pushover-action/compare/v1.1.0...v1.1.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjIxMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: #23
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-03-23 22:15:41 +01:00

66 lines
2.1 KiB
YAML

name: Docker Compose Remove Stack
on:
workflow_call:
secrets:
DEPLOY_HOST:
required: true
type: string
DEPLOY_USERNAME:
required: true
type: string
DEPLOY_SSHKEY:
required: true
type: string
DEPLOY_PORT:
required: true
type: string
PUSHOVER_USER_TOKEN:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: "[ON RUNNER] Notify Build Start"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.3
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
message: "Removing stack ${{ gitea.repository }}"
title: 'Stack Removal Started'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'
- name: "[ON RUNNER] Set project variables"
run: |
projectname="${{ gitea.event.repository.name }}"
echo "project_name=$projectname" >> $GITEA_ENV
echo "project_folder=/home/${{ secrets.DEPLOY_USERNAME }}/$projectname" >> $GITEA_ENV
- name: "[ON HOST] Remove Stack"
uses: appleboy/ssh-action@v1.2.2
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSHKEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
cd ${{ env.project_folder }}
docker compose --env-file .env down
cd ..
rm -rf ${{ env.project_folder }}
- name: "[ON RUNNER] Notify Build End"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.3
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
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'