First test
This commit is contained in:
47
.gitea/workflows/gen.yaml
Normal file
47
.gitea/workflows/gen.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Run temp script and capture output
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # tous les jours à 3h du mat
|
||||
workflow_dispatch: # optionnel : exécution manuelle
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send ntfy notification (Run Started)
|
||||
run: |
|
||||
curl \
|
||||
-u ${{ secrets.NTFY_AUTH }} \
|
||||
-H "Title: LanCache AGH conf generation started" \
|
||||
-H "Priority: 5" \
|
||||
-d "Generating AdguardHome config for Lancache" \
|
||||
https://ntfy.uzurka.fr/lancache
|
||||
|
||||
- name: Setup jq
|
||||
run: |
|
||||
apt update && apt install -y jq
|
||||
|
||||
- name: Generate new config
|
||||
run: |
|
||||
bash scripts/create-adguardhome.sh
|
||||
|
||||
- name: Send ntfy notification (Success)
|
||||
if: success()
|
||||
run: |
|
||||
curl \
|
||||
-u ${{ secrets.NTFY_AUTH }} \
|
||||
-H "LanCache AGH conf generation succeed" \
|
||||
-H "Priority: 5" \
|
||||
-d "LanCache AGH conf generation succeed" \
|
||||
https://ntfy.uzurka.fr/lancache
|
||||
|
||||
- name: Send ntfy notification (Failure)
|
||||
if: failure()
|
||||
run: |
|
||||
curl \
|
||||
-u ${{ secrets.NTFY_AUTH }} \
|
||||
-H "LanCache AGH conf generation failed" \
|
||||
-H "Priority: 5" \
|
||||
-d "LanCache AGH conf generation failed" \
|
||||
https://ntfy.uzurka.fr/lancache
|
||||
Reference in New Issue
Block a user