From 605866661210551e817bb71a18c645906bfcd504 Mon Sep 17 00:00:00 2001 From: thetestgame Date: Wed, 28 Aug 2024 21:44:54 -0500 Subject: [PATCH] Perform test runs on pull requests --- .github/workflows/generate.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index b0bbc3c..cc8c6c0 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -4,7 +4,12 @@ on: schedule: - cron: "0 13 * * 1" - workflow_dispatch: # Allow manual triggering from the Actions tab + # Allow manual triggering from the Actions tab + workflow_dispatch: + + # Run when a pull request is opened to verify. + pull_request: + types: [opened, synchronize] # Jobs to be executed jobs: @@ -40,7 +45,17 @@ jobs: # postmanTimeout: 30000 # Commit any changes to the collection - - name: Commit changes. - uses: stefanzweifel/git-auto-commit-action@v5 + - uses: stefanzweifel/git-auto-commit-action@v5 + if: github.event_name != 'pull_request' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commit_message: "Update Postman Collection [skip ci]" + commit_message: 'ci: Update Postman Collection' + branch: main + commit_user_name: Github-Actions 🤖 + commit_user_email: actions@github.com + commit_author: Github-Actions🤖 + + # Keep the workflow alive + - uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings + if: github.event_name != 'pull_request'