Skip to content

Commit ffdeef0

Browse files
authored
Merge pull request #14306 from Mab879/actions_clean_up_2026_01_14
GitHub Actions Clean up
2 parents 3bfcbfe + 94bc247 commit ffdeef0

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.github/workflows/atex-test.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
echo "pr_sha=${PR_SHA}" >> $GITHUB_OUTPUT
4747
echo "PR Number: ${PR_NUMBER}"
4848
echo "PR SHA: ${PR_SHA}"
49+
if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then
50+
echo "Invalid PR number: $PR_NUMBER"
51+
exit 1
52+
fi
4953
5054
- name: Create GitHub check run
5155
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2.0.0
@@ -201,8 +205,10 @@ jobs:
201205

202206
- name: Update HTML title with PR number
203207
if: always()
208+
env:
209+
PR_NUMBER: ${{ needs.check_build.outputs.pr_number }}
204210
run: |
205-
sed "/<title>/s/>.*</>Test outputs from PR #${{ needs.check_build.outputs.pr_number }} HTML</" \
211+
sed "/<title>/s/>.*</>Test outputs from PR #${PR_NUMBER} HTML</" \
206212
-i atex-html/index.html
207213
208214
- name: Merge test results from all versions
@@ -244,8 +250,8 @@ jobs:
244250
245251
git add .
246252
git commit -m "Test outputs from PR #${PR_NUMBER}"
247-
git tag PR${PR_NUMBER}
248-
git push origin PR${PR_NUMBER}
253+
git tag "PR${PR_NUMBER}"
254+
git push origin "PR${PR_NUMBER}"
249255
250256
- name: Submit results to Testing Farm
251257
if: always()
@@ -295,7 +301,7 @@ jobs:
295301
GH_TOKEN: ${{ secrets.ATEX_RESULTS_TF_REPO_TOKEN }}
296302
PR_NUMBER: ${{ needs.check_build.outputs.pr_number }}
297303
run: |
298-
git push --delete origin PR${PR_NUMBER}
304+
git push --delete origin "PR${PR_NUMBER}"
299305
300306
- name: Update GitHub check run
301307
if: always()

.github/workflows/compare-ds.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ jobs:
5353
repository: ComplianceAsCode/content-test-filtering
5454
path: ctf
5555
- name: Detect content changes in the PR
56-
run: python3 ./ctf/content_test_filtering.py pr --base ${{ steps.pr_info.outputs.fork_point }} --remote_repo ${{ github.server_url }}/${{ github.repository }} --verbose --rule --output json ${{ steps.pr_info.outputs.pr_number }} > output.json
56+
env:
57+
PR_NUMBER: ${{ steps.pr_info.outputs.pr_number }}
58+
FORK_POINT: ${{ steps.pr_info.outputs.fork_point }}
59+
run: python3 ./ctf/content_test_filtering.py pr --base "$FORK_POINT" --remote_repo ${{ github.server_url }}/${{ github.repository }} --verbose --rule --output json "$PR_NUMBER" > output.json
5760
- name: Test if there are no content changes
5861
run: echo "CTF_OUTPUT_SIZE=$(stat --printf="%s" output.json)" >> $GITHUB_OUTPUT
5962
id: ctf

.github/workflows/ctf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Gating
22
on:
3-
pull_request_target:
3+
pull_request:
44
branches: [ master, 'stabilization*' ]
55
jobs:
66
content-test-filtering:

0 commit comments

Comments
 (0)