diff --git a/.gitea/workflows/redeploy.yaml b/.gitea/workflows/redeploy.yaml index 1bf2913..65a5e5b 100644 --- a/.gitea/workflows/redeploy.yaml +++ b/.gitea/workflows/redeploy.yaml @@ -1,19 +1,21 @@ # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions name: Pull Images and Redeploy run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +on: + pull_request: + branches: + - redeploy-stack jobs: Update-and-Redeploy-Stack: runs-on: synology steps: - name: Prefetch Docker Image(s) - if: contains(github.event.head_commit.message, 'run_redeploy') run: | - docker pull linuxserver/bookstack #optional? probably faster if done first... + docker pull linuxserver/bookstack + #optional? probably faster if done first... - name: Fetch stack ID from Portainer - if: contains(github.event.head_commit.message, 'run_redeploy') env: STACK_NAME: bookstack PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }} @@ -30,7 +32,6 @@ jobs: echo "Got stack ID: $STACK_ID and Endpoint ID: $ENDPOINT_ID" - name: Fetch stack configuration - if: contains(github.event.head_commit.message, 'run_redeploy') env: STACK_NAME: bookstack PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }} @@ -43,7 +44,6 @@ jobs: echo "Fetched stack configuration and saved it to stack.yml" - name: Redeploy stack in Portainer - if: contains(github.event.head_commit.message, 'run_redeploy') env: STACK_NAME: bookstack PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }} diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml index b9dfa0c..826c34e 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/tests.yaml @@ -1,10 +1,13 @@ # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions name: Just test things run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +on: + pull_request: + branches: + - test-cmd jobs: - Update-and-Redeploy-Stack: + Pull-and-run: runs-on: synology steps: - name: Checkout