limit random runs?

This commit is contained in:
ThaMunsta
2025-03-15 15:19:59 -04:00
parent a1889c1e0a
commit f3b93d3416
2 changed files with 11 additions and 8 deletions

View File

@@ -1,19 +1,21 @@
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Pull Images and Redeploy name: Pull Images and Redeploy
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push] on:
pull_request:
branches:
- redeploy-stack
jobs: jobs:
Update-and-Redeploy-Stack: Update-and-Redeploy-Stack:
runs-on: synology runs-on: synology
steps: steps:
- name: Prefetch Docker Image(s) - name: Prefetch Docker Image(s)
if: contains(github.event.head_commit.message, 'run_redeploy')
run: | 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 - name: Fetch stack ID from Portainer
if: contains(github.event.head_commit.message, 'run_redeploy')
env: env:
STACK_NAME: bookstack STACK_NAME: bookstack
PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }} PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }}
@@ -30,7 +32,6 @@ jobs:
echo "Got stack ID: $STACK_ID and Endpoint ID: $ENDPOINT_ID" echo "Got stack ID: $STACK_ID and Endpoint ID: $ENDPOINT_ID"
- name: Fetch stack configuration - name: Fetch stack configuration
if: contains(github.event.head_commit.message, 'run_redeploy')
env: env:
STACK_NAME: bookstack STACK_NAME: bookstack
PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }} PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }}
@@ -43,7 +44,6 @@ jobs:
echo "Fetched stack configuration and saved it to stack.yml" echo "Fetched stack configuration and saved it to stack.yml"
- name: Redeploy stack in Portainer - name: Redeploy stack in Portainer
if: contains(github.event.head_commit.message, 'run_redeploy')
env: env:
STACK_NAME: bookstack STACK_NAME: bookstack
PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }} PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }}

View File

@@ -1,10 +1,13 @@
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Just test things name: Just test things
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push] on:
pull_request:
branches:
- test-cmd
jobs: jobs:
Update-and-Redeploy-Stack: Pull-and-run:
runs-on: synology runs-on: synology
steps: steps:
- name: Checkout - name: Checkout