Skip to content

Commit c656a25

Browse files
authored
Merge pull request #3094 from github/copilot/stack-pr-3088
Sync Action version updates back to the source templates in the `pr-checks` directory
2 parents 1a80c9b + 2885255 commit c656a25

15 files changed

+456
-19
lines changed

.github/workflows/pr-checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ jobs:
5151
- name: Run unit tests
5252
run: npm test
5353

54+
- name: Run pr-checks tests
55+
working-directory: pr-checks
56+
run: python -m unittest discover
57+
5458
- name: Lint
5559
if: matrix.os != 'windows-latest'
5660
run: npm run lint-ci

.github/workflows/rebuild.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
if: github.event.label.name == 'Rebuild' || github.event_name == 'workflow_dispatch'
1313

14+
env:
15+
HEAD_REF: ${{ github.event.pull_request.head.ref || github.event.ref }}
16+
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
17+
1418
permissions:
1519
contents: write # needed to push rebuilt commit
1620
pull-requests: write # needed to comment on the PR
@@ -19,7 +23,7 @@ jobs:
1923
uses: actions/checkout@v5
2024
with:
2125
fetch-depth: 0
22-
ref: ${{ github.event.pull_request.head.ref || github.event.ref }}
26+
ref: ${{ env.HEAD_REF }}
2327

2428
- name: Remove label
2529
if: github.event_name == 'pull_request'
@@ -37,8 +41,6 @@ jobs:
3741
3842
- name: Merge in changes from base branch
3943
id: merge
40-
env:
41-
BASE_BRANCH: ${{ github.event.pull_request.base.ref || 'main' }}
4244
run: |
4345
git fetch origin "$BASE_BRANCH"
4446
@@ -72,9 +74,16 @@ jobs:
7274
with:
7375
python-version: 3.11
7476

77+
- name: Sync back version updates to generated workflows
78+
# Only sync back versions on Dependabot update PRs
79+
if: startsWith(env.HEAD_REF, 'dependabot/')
80+
working-directory: pr-checks
81+
run: |
82+
python3 sync_back.py -v
83+
7584
- name: Generate workflows
85+
working-directory: pr-checks
7686
run: |
77-
cd pr-checks
7887
python -m pip install --upgrade pip
7988
pip install ruamel.yaml==0.17.31
8089
python3 sync.py

pr-checks/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
env
2+
__pycache__/
3+
*.pyc

pr-checks/__init__.py

Whitespace-only changes.

pr-checks/checks/bundle-toolcache.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ operatingSystems:
88
- windows
99
steps:
1010
- name: Remove CodeQL from toolcache
11-
uses: actions/github-script@v7
11+
uses: actions/github-script@v8
1212
with:
1313
script: |
1414
const fs = require('fs');
@@ -18,7 +18,7 @@ steps:
1818
- name: Install @actions/tool-cache
1919
run: npm install @actions/tool-cache
2020
- name: Check toolcache does not contain CodeQL
21-
uses: actions/github-script@v7
21+
uses: actions/github-script@v8
2222
with:
2323
script: |
2424
const toolcache = require('@actions/tool-cache');
@@ -37,7 +37,7 @@ steps:
3737
output: ${{ runner.temp }}/results
3838
upload-database: false
3939
- name: Check CodeQL is installed within the toolcache
40-
uses: actions/github-script@v7
40+
uses: actions/github-script@v8
4141
with:
4242
script: |
4343
const toolcache = require('@actions/tool-cache');

pr-checks/checks/bundle-zstd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ operatingSystems:
88
- windows
99
steps:
1010
- name: Remove CodeQL from toolcache
11-
uses: actions/github-script@v7
11+
uses: actions/github-script@v8
1212
with:
1313
script: |
1414
const fs = require('fs');
@@ -33,7 +33,7 @@ steps:
3333
path: ${{ runner.temp }}/results/javascript.sarif
3434
retention-days: 7
3535
- name: Check diagnostic with expected tools URL appears in SARIF
36-
uses: actions/github-script@v7
36+
uses: actions/github-script@v8
3737
env:
3838
SARIF_PATH: ${{ runner.temp }}/results/javascript.sarif
3939
with:

pr-checks/checks/config-export.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ steps:
1818
path: "${{ runner.temp }}/results/javascript.sarif"
1919
retention-days: 7
2020
- name: Check config properties appear in SARIF
21-
uses: actions/github-script@v7
21+
uses: actions/github-script@v8
2222
env:
2323
SARIF_PATH: "${{ runner.temp }}/results/javascript.sarif"
2424
with:

pr-checks/checks/diagnostics-export.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ steps:
3232
path: "${{ runner.temp }}/results/javascript.sarif"
3333
retention-days: 7
3434
- name: Check diagnostics appear in SARIF
35-
uses: actions/github-script@v7
35+
uses: actions/github-script@v8
3636
env:
3737
SARIF_PATH: "${{ runner.temp }}/results/javascript.sarif"
3838
with:

pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
languages: go
1313
tools: ${{ steps.prepare-test.outputs.tools-url }}
1414
# Deliberately change Go after the `init` step
15-
- uses: actions/setup-go@v5
15+
- uses: actions/setup-go@v6
1616
with:
1717
go-version: "1.20"
1818
- name: Build code
@@ -23,7 +23,7 @@ steps:
2323
output: "${{ runner.temp }}/results"
2424
upload-database: false
2525
- name: Check diagnostic appears in SARIF
26-
uses: actions/github-script@v7
26+
uses: actions/github-script@v8
2727
env:
2828
SARIF_PATH: "${{ runner.temp }}/results/go.sarif"
2929
with:

pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
output: "${{ runner.temp }}/results"
2525
upload-database: false
2626
- name: Check diagnostic appears in SARIF
27-
uses: actions/github-script@v7
27+
uses: actions/github-script@v8
2828
env:
2929
SARIF_PATH: "${{ runner.temp }}/results/go.sarif"
3030
with:

0 commit comments

Comments
 (0)