29 lines
1020 B
YAML
29 lines
1020 B
YAML
name: Gitea Actions Demo
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- glance/**
|
|
|
|
env:
|
|
app_folder: glance
|
|
|
|
jobs:
|
|
Explore-Gitea-Actions:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Execute remote SSH commands using password
|
|
uses: appleboy/ssh-action@v1
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: geezo
|
|
password: ${{ secrets.PASSWORD }}
|
|
port: ${{ secrets.PORT }}
|
|
script: |
|
|
cd /home/geezo/docker_containers && \
|
|
if ./restart_container.sh ${{ env.app_folder }}; then
|
|
curl -H "Title: Docker Container Update" -H "Priority: high" -H "Tags: docker,success" -d "Successfully updated ${{ env.app_folder }} container" https://ntfy.geezo.site/docker
|
|
else
|
|
curl -H "Title: Docker Container Update" -H "Priority: urgent" -H "Tags: docker,error" -d "Failed to update ${{ env.app_folder }} container" https://ntfy.geezo.site/docker
|
|
fi |