File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ on: # yamllint disable-line rule:truthy
55 push :
66 branches :
77 - main
8- pull_request :
8+ pull_request_target :
99 types : [opened, synchronize, reopened, labeled]
1010 workflow_dispatch :
1111
1717 steps :
1818 - name : Checkout repository
1919 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+ with :
21+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
2022
2123 - name : Set up PDM
2224 uses : pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0 # v4.4
4547 build :
4648 name : Build and push image
4749 runs-on : ubuntu-latest
50+ environment : ${{ github.event.pull_request.head.repo.fork && 'build-and-test' || '' }}
4851
4952 steps :
5053 - name : Set variables
5659 echo "tags=${{ github.sha }}">> $GITHUB_OUTPUT
5760 fi
5861 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
62+ with :
63+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
5964
6065 - name : Build Image
6166 id : build-image
95100 runs-on : ubuntu-latest
96101 steps :
97102 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
103+ with :
104+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
98105
99106 - name : Prepare
100107 id : prepare
Original file line number Diff line number Diff line change @@ -212,6 +212,20 @@ running OCP cluster and requires some resources a tests are execute only when
212212workflow.
213213
214214All PRs should pass a tests before merging.
215+
216+ ### CI/CD for external contributors
217+ The repository contains Github Actions workflows that automatically run all
218+ CI steps including linting, building and testing the operator pipelines.
219+
220+ In case of a pull request from a forked repository the tests are not executed
221+ automatically due to security reasons. To run the tests an owner of the repository
222+ must review the pull request to make sure it doesn't contain any malicious code
223+ then approve the ` build-and-test ` workflow environment.
224+
225+ The manuall approval is not needed for contributors who have write access to the
226+ repository and not using a forked repository.
227+
228+
215229## Additional Documentation
216230
217231- [ OpenShift cluster configuration] ( docs/cluster-config.md )
You can’t perform that action at this time.
0 commit comments