Skip to content

Commit 9292284

Browse files
authored
Perform test runs on pull requests (#3)
1 parent e44a89c commit 9292284

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/generate.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ on:
44
schedule:
55
- cron: "0 13 * * 1"
66

7-
workflow_dispatch: # Allow manual triggering from the Actions tab
7+
# Allow manual triggering from the Actions tab
8+
workflow_dispatch:
9+
10+
# Run when a pull request is opened to verify.
11+
pull_request:
12+
types: [opened, synchronize]
813

914
# Jobs to be executed
1015
jobs:
@@ -36,11 +41,16 @@ jobs:
3641

3742
# Commit any changes to the collection
3843
- uses: stefanzweifel/git-auto-commit-action@v5
44+
if: github.event_name != 'pull_request'
3945
env:
4046
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4147
with:
42-
commit_message: Update Postman Collection
48+
commit_message: 'ci: Update Postman Collection'
4349
branch: main
4450
commit_user_name: Github-Actions 🤖
4551
commit_user_email: [email protected]
46-
commit_author: Github-Actions🤖 <[email protected]>
52+
commit_author: Github-Actions🤖 <[email protected]>
53+
54+
# Keep the workflow alive
55+
- uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings
56+
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)