Files
runner-test/.gitea/workflows/demo.yaml
ThaMunsta a814f60d17
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
probably dont put keys in repos eh
2025-03-14 15:59:52 -04:00

29 lines
1.2 KiB
YAML

# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: synology
steps:
- run: docker pull linuxserver/bookstack
- name: Fetch stack ID from Portainer
run: |
STACK_NAME="bookstack"
PORTAINER_API_URL="https://portainer.dev.nervesocket.com/api"
PORTAINER_TOKEN="ptr_QkR9kDZuoC1QOwp+axwJPkK5av4NlmyjihS3JmTdPww="
STACK_ID=$(curl -s -H "X-API-Key: $PORTAINER_TOKEN" "$PORTAINER_API_URL/stacks" | jq -r ".[] | select(.Name==\"$STACK_NAME\") | .Id")
echo "STACK_ID=$STACK_ID" >> $GITHUB_ENV
- name: Trigger stack update in Portainer
run: |
PORTAINER_API_URL="https://portainer.dev.nervesocket.com/api"
PORTAINER_TOKEN="ptr_QkR9kDZuoC1QOwp+axwJPkK5av4NlmyjihS3JmTdPww="
curl -X POST "$PORTAINER_API_URL/stacks/$STACK_ID/redeploy" \
-H "X-API-Key: $PORTAINER_TOKEN" \
-H "Content-Type: application/json" \
--data '{"pullImage": true}'
- run: echo "🍏 This job's status is ${{ job.status }}."