Skip to content

Commit 570260b

Browse files
authored
Merge pull request github#17963 from github/esbena/actions/artifact-v4
chore(actions): bump to artifacts@v4
2 parents 1ca2590 + a70438b commit 570260b

14 files changed

+56
-48
lines changed

.github/workflows/csv-coverage-metrics.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
DATABASE="${{ runner.temp }}/java-database"
3939
codeql database analyze --format=sarif-latest --output=metrics-java.sarif -- "$DATABASE" ./java/ql/src/Metrics/Summaries/FrameworkCoverage.ql
40-
- uses: actions/upload-artifact@v3
40+
- uses: actions/upload-artifact@v4
4141
with:
4242
name: metrics-java.sarif
4343
path: metrics-java.sarif
@@ -64,7 +64,7 @@ jobs:
6464
run: |
6565
DATABASE="${{ runner.temp }}/csharp-database"
6666
codeql database analyze --format=sarif-latest --output=metrics-csharp.sarif -- "$DATABASE" ./csharp/ql/src/Metrics/Summaries/FrameworkCoverage.ql
67-
- uses: actions/upload-artifact@v3
67+
- uses: actions/upload-artifact@v4
6868
with:
6969
name: metrics-csharp.sarif
7070
path: metrics-csharp.sarif

.github/workflows/csv-coverage-pr-artifacts.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@ jobs:
7171
run: |
7272
python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md
7373
- name: Upload CSV package list
74-
uses: actions/upload-artifact@v3
74+
uses: actions/upload-artifact@v4
7575
with:
7676
name: csv-framework-coverage-merge
7777
path: |
7878
out_merge/framework-coverage-*.csv
7979
out_merge/framework-coverage-*.rst
8080
- name: Upload CSV package list
81-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
8282
with:
8383
name: csv-framework-coverage-base
8484
path: |
8585
out_base/framework-coverage-*.csv
8686
out_base/framework-coverage-*.rst
8787
- name: Upload comparison results
88-
uses: actions/upload-artifact@v3
88+
uses: actions/upload-artifact@v4
8989
with:
9090
name: comparison
9191
path: |
@@ -97,7 +97,7 @@ jobs:
9797
env:
9898
PR_NUMBER: ${{ github.event.pull_request.number }}
9999
- name: Upload PR number
100-
uses: actions/upload-artifact@v3
100+
uses: actions/upload-artifact@v4
101101
with:
102102
name: pr
103103
path: pr/
@@ -117,7 +117,7 @@ jobs:
117117
GITHUB_TOKEN: ${{ github.token }}
118118
PR_NUMBER: ${{ github.event.pull_request.number }}
119119
- name: Upload comment ID (if it exists)
120-
uses: actions/upload-artifact@v3
120+
uses: actions/upload-artifact@v4
121121
with:
122122
name: comment
123123
path: comment/

.github/workflows/csv-coverage-timeseries.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
python script/misc/scripts/library-coverage/generate-timeseries.py codeqlModels
3232
- name: Upload timeseries CSV
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: framework-coverage-timeseries
3636
path: framework-coverage-timeseries-*.csv

.github/workflows/csv-coverage.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
run: |
3535
python script/misc/scripts/library-coverage/generate-report.py ci codeqlModels script
3636
- name: Upload CSV package list
37-
uses: actions/upload-artifact@v3
37+
uses: actions/upload-artifact@v4
3838
with:
3939
name: framework-coverage-csv
4040
path: framework-coverage-*.csv
4141
- name: Upload RST package list
42-
uses: actions/upload-artifact@v3
42+
uses: actions/upload-artifact@v4
4343
with:
4444
name: framework-coverage-rst
4545
path: framework-coverage-*.rst

.github/workflows/mad_modelDiff.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,20 @@ jobs:
3838
path: codeql-main
3939
ref: main
4040
- uses: ./codeql-main/.github/actions/fetch-codeql
41+
# compute the shortname of the project that does not contain any special (disk) characters
42+
- run: |
43+
echo "SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}" >> $GITHUB_OUTPUT
44+
env:
45+
SLUG: ${{ matrix.slug }}
46+
id: shortname
4147
- name: Download database
4248
env:
4349
SLUG: ${{ matrix.slug }}
4450
GH_TOKEN: ${{ github.token }}
51+
SHORTNAME: ${{ steps.shortname.outputs.SHORTNAME }}
4552
run: |
4653
set -x
4754
mkdir lib-dbs
48-
SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}
4955
gh api -H "Accept: application/zip" "/repos/${SLUG}/code-scanning/codeql/databases/java" > "$SHORTNAME.zip"
5056
unzip -q -d "${SHORTNAME}-db" "${SHORTNAME}.zip"
5157
mkdir "lib-dbs/$SHORTNAME/"
@@ -93,14 +99,14 @@ jobs:
9399
name="diff_${basename/.model.yml/""}"
94100
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
95101
done
96-
- uses: actions/upload-artifact@v3
102+
- uses: actions/upload-artifact@v4
97103
with:
98-
name: models
104+
name: models-${{ steps.shortname.outputs.SHORTNAME }}
99105
path: tmp-models/**/**/*.model.yml
100106
retention-days: 20
101-
- uses: actions/upload-artifact@v3
107+
- uses: actions/upload-artifact@v4
102108
with:
103-
name: diffs
109+
name: diffs-${{ steps.shortname.outputs.SHORTNAME }}
104110
path: tmp-models/*.html
105111
# An html file is only produced if the generated models differ.
106112
if-no-files-found: ignore

.github/workflows/mad_regenerate-models.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
find java -name "*.model.yml" -print0 | xargs -0 git add
6060
git status
6161
git diff --cached > models.patch
62-
- uses: actions/upload-artifact@v3
62+
- uses: actions/upload-artifact@v4
6363
with:
6464
name: patch
6565
path: models.patch

.github/workflows/post-pr-comment.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ jobs:
1717
post_comment:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- name: Download artifact
21-
run: gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment"
20+
- name: Download artifacts
21+
run: |
22+
gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment-pr-number"
23+
gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment-body"
24+
gh run download "${WORKFLOW_RUN_ID}" --repo "${GITHUB_REPOSITORY}" --name "comment-id"
2225
env:
2326
GITHUB_TOKEN: ${{ github.token }}
2427
WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }}

.github/workflows/qhelp-pr-preview.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
- run: echo "${PR_NUMBER}" > pr_number.txt
3737
env:
3838
PR_NUMBER: ${{ github.event.number }}
39-
- uses: actions/upload-artifact@v3
39+
- uses: actions/upload-artifact@v4
4040
with:
41-
name: comment
41+
name: comment-pr-number
4242
path: pr_number.txt
4343
if-no-files-found: error
4444
retention-days: 1
@@ -78,9 +78,9 @@ jobs:
7878
exit "${EXIT_CODE}"
7979
8080
- if: ${{ !cancelled() }}
81-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
8282
with:
83-
name: comment
83+
name: comment-body
8484
path: comment_body.txt
8585
if-no-files-found: error
8686
retention-days: 1
@@ -94,9 +94,9 @@ jobs:
9494
GITHUB_TOKEN: ${{ github.token }}
9595
PR_NUMBER: ${{ github.event.number }}
9696

97-
- uses: actions/upload-artifact@v3
97+
- uses: actions/upload-artifact@v4
9898
with:
99-
name: comment
99+
name: comment-id
100100
path: comment_id.txt
101101
if-no-files-found: error
102102
retention-days: 1

.github/workflows/ql-for-ql-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
sarif_file: ql-for-ql.sarif
7676
category: ql-for-ql
7777
- name: Sarif as artifact
78-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7979
with:
8080
name: ql-for-ql.sarif
8181
path: ql-for-ql.sarif
@@ -84,7 +84,7 @@ jobs:
8484
mkdir split-sarif
8585
node ./ql/scripts/split-sarif.js ql-for-ql.sarif split-sarif
8686
- name: Upload langs as artifacts
87-
uses: actions/upload-artifact@v3
87+
uses: actions/upload-artifact@v4
8888
with:
8989
name: ql-for-ql-langs
9090
path: split-sarif

.github/workflows/ql-for-ql-dataset_measure.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
"${CODEQL}" dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ql"
6666
env:
6767
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
68-
- uses: actions/upload-artifact@v3
68+
- uses: actions/upload-artifact@v4
6969
with:
7070
name: measurements
7171
path: stats
@@ -76,14 +76,14 @@ jobs:
7676
needs: measure
7777
steps:
7878
- uses: actions/checkout@v4
79-
- uses: actions/download-artifact@v3
79+
- uses: actions/download-artifact@v4
8080
with:
8181
name: measurements
8282
path: stats
8383
- run: |
8484
python -m pip install --user lxml
8585
find stats -name 'stats.xml' -print0 | sort -z | xargs -0 python ruby/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
86-
- uses: actions/upload-artifact@v3
86+
- uses: actions/upload-artifact@v4
8787
with:
8888
name: ql.dbscheme.stats
8989
path: ql/ql/src/ql.dbscheme.stats

.github/workflows/query-list.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
python codeql/misc/scripts/generate-code-scanning-query-list.py > code-scanning-query-list.csv
3939
- name: Upload code scanning query list
40-
uses: actions/upload-artifact@v3
40+
uses: actions/upload-artifact@v4
4141
with:
4242
name: code-scanning-query-list
4343
path: code-scanning-query-list.csv

.github/workflows/ruby-build.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ jobs:
9292
- name: Generate dbscheme
9393
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
9494
run: ../target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
95-
- uses: actions/upload-artifact@v3
95+
- uses: actions/upload-artifact@v4
9696
if: ${{ matrix.os == 'ubuntu-latest' }}
9797
with:
9898
name: ruby.dbscheme
9999
path: ruby/ql/lib/ruby.dbscheme
100-
- uses: actions/upload-artifact@v3
100+
- uses: actions/upload-artifact@v4
101101
if: ${{ matrix.os == 'ubuntu-latest' }}
102102
with:
103103
name: TreeSitter.qll
104104
path: ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
105-
- uses: actions/upload-artifact@v3
105+
- uses: actions/upload-artifact@v4
106106
with:
107107
name: extractor-${{ matrix.os }}
108108
path: |
@@ -134,7 +134,7 @@ jobs:
134134
PACK_FOLDER=$(readlink -f "$PACKS"/codeql/ruby-queries/*)
135135
codeql generate query-help --format=sarifv2.1.0 --output="${PACK_FOLDER}/rules.sarif" ql/src
136136
(cd ql/src; find queries \( -name '*.qhelp' -o -name '*.rb' -o -name '*.erb' \) -exec bash -c 'mkdir -p "'"${PACK_FOLDER}"'/$(dirname "{}")"' \; -exec cp "{}" "${PACK_FOLDER}/{}" \;)
137-
- uses: actions/upload-artifact@v3
137+
- uses: actions/upload-artifact@v4
138138
with:
139139
name: codeql-ruby-queries
140140
path: |
@@ -147,19 +147,19 @@ jobs:
147147
needs: [build, compile-queries]
148148
steps:
149149
- uses: actions/checkout@v4
150-
- uses: actions/download-artifact@v3
150+
- uses: actions/download-artifact@v4
151151
with:
152152
name: ruby.dbscheme
153153
path: ruby/ruby
154-
- uses: actions/download-artifact@v3
154+
- uses: actions/download-artifact@v4
155155
with:
156156
name: extractor-ubuntu-latest
157157
path: ruby/linux64
158-
- uses: actions/download-artifact@v3
158+
- uses: actions/download-artifact@v4
159159
with:
160160
name: extractor-windows-latest
161161
path: ruby/win64
162-
- uses: actions/download-artifact@v3
162+
- uses: actions/download-artifact@v4
163163
with:
164164
name: extractor-macos-latest
165165
path: ruby/osx64
@@ -172,13 +172,13 @@ jobs:
172172
cp win64/codeql-extractor-ruby.exe ruby/tools/win64/extractor.exe
173173
chmod +x ruby/tools/{linux64,osx64}/extractor
174174
zip -rq codeql-ruby.zip ruby
175-
- uses: actions/upload-artifact@v3
175+
- uses: actions/upload-artifact@v4
176176
with:
177177
name: codeql-ruby-pack
178178
path: ruby/codeql-ruby.zip
179179
retention-days: 1
180180
include-hidden-files: true
181-
- uses: actions/download-artifact@v3
181+
- uses: actions/download-artifact@v4
182182
with:
183183
name: codeql-ruby-queries
184184
path: ruby/qlpacks
@@ -190,7 +190,7 @@ jobs:
190190
]
191191
}' > .codeqlmanifest.json
192192
zip -rq codeql-ruby-bundle.zip .codeqlmanifest.json ruby qlpacks
193-
- uses: actions/upload-artifact@v3
193+
- uses: actions/upload-artifact@v4
194194
with:
195195
name: codeql-ruby-bundle
196196
path: ruby/codeql-ruby-bundle.zip
@@ -214,7 +214,7 @@ jobs:
214214
uses: ./.github/actions/fetch-codeql
215215

216216
- name: Download Ruby bundle
217-
uses: actions/download-artifact@v3
217+
uses: actions/download-artifact@v4
218218
with:
219219
name: codeql-ruby-bundle
220220
path: ${{ runner.temp }}

.github/workflows/ruby-dataset-measure.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ jobs:
5252
run: |
5353
mkdir -p "stats/${{ matrix.repo }}"
5454
codeql dataset measure --threads 4 --output "stats/${{ matrix.repo }}/stats.xml" "${{ runner.temp }}/database/db-ruby"
55-
- uses: actions/upload-artifact@v3
55+
- uses: actions/upload-artifact@v4
5656
with:
57-
name: measurements
57+
name: measurements-${{ hashFiles('stats/**') }}
5858
path: stats
5959
retention-days: 1
6060

@@ -63,14 +63,13 @@ jobs:
6363
needs: measure
6464
steps:
6565
- uses: actions/checkout@v4
66-
- uses: actions/download-artifact@v3
66+
- uses: actions/download-artifact@v4
6767
with:
68-
name: measurements
6968
path: stats
7069
- run: |
7170
python -m pip install --user lxml
7271
find stats -name 'stats.xml' | sort | xargs python ruby/scripts/merge_stats.py --output ruby/ql/lib/ruby.dbscheme.stats --normalise ruby_tokeninfo
73-
- uses: actions/upload-artifact@v3
72+
- uses: actions/upload-artifact@v4
7473
with:
7574
name: ruby.dbscheme.stats
7675
path: ruby/ql/lib/ruby.dbscheme.stats

.github/workflows/swift.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
- name: Generate C++ files
9999
run: |
100100
bazel run //swift/codegen:codegen -- --generate=trap,cpp --cpp-output=$PWD/generated-cpp-files
101-
- uses: actions/upload-artifact@v3
101+
- uses: actions/upload-artifact@v4
102102
with:
103103
name: swift-generated-cpp-files
104104
path: generated-cpp-files/**

0 commit comments

Comments
 (0)