We have a public SDK repo for which I am writing multiple github workflows. One such workflow includes Generating a Release SDK(minified, encoded with private keys) when a PR is raised from develop to master. another such action is to run static code checks when a PR is raised from task/** branch to develop branch.
I tried to use the following workflow:
name: validate PR raised from task/** branched to develop branch
on:
pull_request:
branches: [ task/** ]
pull_request_target:
branches: [ develop ]
...
this code is pushed to develop branch. but this triggers the workflow twice everytime a PR is raised or modified, indicating that the action is running with 'OR' configuration. I would like to run this workflow only once in 'AND' condition (i.e when the source branch is task/** AND target branch is develop)
For my first usecase, it is very important that only internal devs can trigger the generate build. so is that possible to run the actions for specific target and source branch?