Skip to content

Commit c2f2014

Browse files
committed
Restrict workflow runs to cfengine organization pull requests
The workflow event must be pull_request in order for the scripts to know what baseref (branch) to use for dependent repos. Before this change master branch worked fine but branch dependency PRs from github-actions(bot) would fail due to always checking out master. Ticket: ENT-13038 Changelog: none (cherry picked from commit 0621c06) Conflicts: .github/workflows/build-using-buildscripts.yml We don't need changes to build-using-buildscripts.yml, only ci.yml
1 parent ca18b76 commit c2f2014

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Continuous Integration
22

3-
# Run this CI on all pushes to upstream
4-
# (including PRs fromm usptream to upstream)
5-
on: push
3+
on: pull_request
64

75
jobs:
86
build_cfengine_hub_package:
7+
# this job only works when submitted from the cfengine organization aka upstream to upstream pull requests: ENT-13038
8+
if: github.event.organization.login == 'cfengine'
99
uses: ./.github/workflows/build-using-buildscripts.yml
1010
secrets: inherit
1111

0 commit comments

Comments
 (0)