2323 # will prevent the job from running until it's approved manually by human intervention.
2424 pull_request_target :
2525 types : [opened, synchronize, reopened, ready_for_review]
26- branches :
26+ branches :
2727 - main
28- - rhdh-1.**
29- - 1.**.x
3028 - release-1.**
29+ - release-2.**
3130
3231concurrency :
3332 group : ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}
3433 cancel-in-progress : true
3534
36- env :
35+ env :
3736 GH_TEAM : rhdh
3837 GH_ORGANIZATION : redhat-developer
3938jobs :
4746 uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
4847 with :
4948 app-id : ${{ secrets.RHDH_GITHUB_APP_ID }}
50- private-key : ${{ secrets.RHDH_GITHUB_APP_PRIVATE_KEY }}
49+ private-key : ${{ secrets.RHDH_GITHUB_APP_PRIVATE_KEY }}
5150 - name : Check team membership
5251 uses : redhat-developer/rhdh/.github/actions/check-author@main
5352 id : check-team-membership
@@ -86,10 +85,10 @@ jobs:
8685 pull-requests : write
8786
8887 steps :
89- - name : Checkout main branch to get trusted build scripts
88+ - name : Checkout trusted build scripts from ${{ github.event.pull_request.base.ref }} branch
9089 uses : actions/checkout@v4
9190 with :
92- ref : main
91+ ref : ${{ github.event.pull_request.base.ref }}
9392 path : trusted-scripts
9493
9594 - name : Checkout PR branch for content to build
@@ -105,7 +104,7 @@ jobs:
105104 # update
106105 sudo apt-get update -y || true
107106 # install
108- sudo apt-get -y -q install podman && podman --version
107+ sudo apt-get -y -q install podman rsync && podman --version
109108 echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
110109
111110 - name : Install lychee
@@ -131,11 +130,7 @@ jobs:
131130 GITHUB_TOKEN : ${{ secrets.RHDH_BOT_TOKEN }}
132131 run : |
133132 echo "Building PR ${{ github.event.pull_request.number }}"
134- cp trusted-scripts/build/scripts/build-ccutil.sh pr-content/build/scripts/build-ccutil.sh
135- cp trusted-scripts/build/scripts/build-orchestrator.js pr-content/build/scripts/build-orchestrator.js
136- cp trusted-scripts/build/scripts/error-patterns.json pr-content/build/scripts/error-patterns.json
137- cp trusted-scripts/lychee.toml pr-content/lychee.toml
138- cp trusted-scripts/.lycheeignore pr-content/.lycheeignore
133+ rsync -az trusted-scripts/* .lycheeignore lychee.toml pr-content/
139134 touch pr-content/.lycheecache
140135 cd pr-content
141136 build/scripts/build-ccutil.sh -b "pr-${{ github.event.number }}"
0 commit comments