mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Regenerate framework models
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "30 2 * * *"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".github/workflows/mad_regenerate-models.yml"
|
|
|
|
jobs:
|
|
regenerate-models:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# placeholder required for each axis, excluded below, replaced by the actual combinations (see include)
|
|
slug: ["placeholder"]
|
|
ref: ["placeholder"]
|
|
include:
|
|
- slug: "apache/commons-io"
|
|
ref: "8985de8fe74f6622a419b37a6eed0dbc484dc128"
|
|
exclude:
|
|
- slug: "placeholder"
|
|
ref: "placeholder"
|
|
steps:
|
|
- name: Clone self (github/codeql)
|
|
uses: actions/checkout@v3
|
|
- name: Setup CodeQL binaries
|
|
uses: ./.github/actions/fetch-codeql
|
|
- name: Clone repositories
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: repos/${{ matrix.ref }}
|
|
ref: ${{ matrix.ref }}
|
|
repository: ${{ matrix.slug }}
|
|
- name: Build database
|
|
env:
|
|
SLUG: ${{ matrix.slug }}
|
|
REF: ${{ matrix.ref }}
|
|
run: |
|
|
mkdir dbs
|
|
cd repos/${REF}
|
|
SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}
|
|
codeql database create --language=java ../../dbs/${SHORTNAME}
|
|
- name: Regenerate models in-place
|
|
env:
|
|
SLUG: ${{ matrix.slug }}
|
|
run: |
|
|
SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}
|
|
java/ql/src/utils/model-generator/RegenerateModels.py "${SLUG}" dbs/${SHORTNAME}
|
|
- name: Stage changes
|
|
run: |
|
|
find java -name "*.qll" -print0 | xargs -0 git add
|
|
git status
|
|
git diff --cached > models.patch
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: patch
|
|
path: models.patch
|
|
retention-days: 7
|