Skip to content

Commit 7cc2664

Browse files
chore: only run CQA analysis for main and future branches, not the older ones where we didn't implement CQA scripts; also checkout build scripts from the PR's base branch, not main, so we get the correct tooling (#2063)
* chore: only run CQA analysis for main and future branches, not the older ones. * Checkout trusted build scripts from the PR's base branch, not main, so we get the correct tooling Signed-off-by: Nick Boldt <nboldt@redhat.com> * Update .github/workflows/content-quality-assessment.yml Co-authored-by: Gerry-Forde <63045020+Gerry-Forde@users.noreply.github.com> --------- Signed-off-by: Nick Boldt <nboldt@redhat.com> Co-authored-by: Gerry-Forde <63045020+Gerry-Forde@users.noreply.github.com>
1 parent 61a112b commit 7cc2664

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

.github/workflows/content-quality-assessment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ on:
1717
- 'build/scripts/**'
1818
branches:
1919
- main
20-
- rhdh-1.**
21-
- 1.**.x
22-
- release-1.**
20+
- release-1.9-post-cqa
21+
- release-1.10
22+
- release-2.**
2323

2424
concurrency:
2525
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}

.github/workflows/pr.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ on:
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

3231
concurrency:
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
3938
jobs:
@@ -47,7 +46,7 @@ jobs:
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

Comments
 (0)