mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
feat(actions/MAD): matrix-unique artifact names
This commit is contained in:
12
.github/workflows/mad_modelDiff.yml
vendored
12
.github/workflows/mad_modelDiff.yml
vendored
@@ -38,14 +38,20 @@ jobs:
|
|||||||
path: codeql-main
|
path: codeql-main
|
||||||
ref: main
|
ref: main
|
||||||
- uses: ./codeql-main/.github/actions/fetch-codeql
|
- uses: ./codeql-main/.github/actions/fetch-codeql
|
||||||
|
# compute the shortname of the project that does not contain any special (disk) characters
|
||||||
|
- run: |
|
||||||
|
echo "SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
SLUG: ${{ matrix.slug }}
|
||||||
|
id: shortname
|
||||||
- name: Download database
|
- name: Download database
|
||||||
env:
|
env:
|
||||||
SLUG: ${{ matrix.slug }}
|
SLUG: ${{ matrix.slug }}
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
SHORTNAME: ${{ steps.shortname.outputs.SHORTNAME }}
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
mkdir lib-dbs
|
mkdir lib-dbs
|
||||||
SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}
|
|
||||||
gh api -H "Accept: application/zip" "/repos/${SLUG}/code-scanning/codeql/databases/java" > "$SHORTNAME.zip"
|
gh api -H "Accept: application/zip" "/repos/${SLUG}/code-scanning/codeql/databases/java" > "$SHORTNAME.zip"
|
||||||
unzip -q -d "${SHORTNAME}-db" "${SHORTNAME}.zip"
|
unzip -q -d "${SHORTNAME}-db" "${SHORTNAME}.zip"
|
||||||
mkdir "lib-dbs/$SHORTNAME/"
|
mkdir "lib-dbs/$SHORTNAME/"
|
||||||
@@ -95,12 +101,12 @@ jobs:
|
|||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: models
|
name: models-${{ steps.shortname.outputs.SHORTNAME }}
|
||||||
path: tmp-models/**/**/*.model.yml
|
path: tmp-models/**/**/*.model.yml
|
||||||
retention-days: 20
|
retention-days: 20
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: diffs
|
name: diffs-${{ steps.shortname.outputs.SHORTNAME }}
|
||||||
path: tmp-models/*.html
|
path: tmp-models/*.html
|
||||||
# An html file is only produced if the generated models differ.
|
# An html file is only produced if the generated models differ.
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user