From 06b606d3e65670f30ac7c3c1450a43f66c7d9c76 Mon Sep 17 00:00:00 2001 From: Tadas Petra Date: Fri, 6 Dec 2024 17:17:37 -0600 Subject: [PATCH] manual action triggers --- .github/workflows/create-discussions.yml | 16 ++++++++++------ .github/workflows/update-votes.yml | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/create-discussions.yml b/.github/workflows/create-discussions.yml index 2854e63..0588d29 100644 --- a/.github/workflows/create-discussions.yml +++ b/.github/workflows/create-discussions.yml @@ -1,11 +1,12 @@ name: Create GitHub Discussions on: - push: - branches: - - main - paths: - - "src/content/apps/**" + # pull_request: + # types: [closed] + # branches: + # - main + # paths: + # - "src/content/apps/**" workflow_dispatch: inputs: name: @@ -23,7 +24,10 @@ on: jobs: create-discussion: - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') + if: > + github.event_name == 'workflow_dispatch' || + (github.event_name == 'pull_request' && + github.event.pull_request.merged == true) runs-on: ubuntu-latest permissions: discussions: write diff --git a/.github/workflows/update-votes.yml b/.github/workflows/update-votes.yml index b729c10..7eb385d 100644 --- a/.github/workflows/update-votes.yml +++ b/.github/workflows/update-votes.yml @@ -4,9 +4,9 @@ on: schedule: - cron: "0 */1 * * *" # Run every 6 hours workflow_dispatch: # Allow manual triggers - push: - branches: - - main + # push: + # branches: + # - main jobs: update-votes: