Bump the extractor group with 2 updates #252
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Compile Extractor Pack | |
on: | |
pull_request: | |
branches: ["main", "develop"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: read | |
pull-requests: read | |
jobs: | |
extractor: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | |
id: changes | |
with: | |
filters: | | |
src: | |
- 'extractor/**' | |
- 'rust-toolchain.toml' | |
- 'Cargo.*' | |
- uses: dtolnay/rust-toolchain@nightly | |
if: steps.changes.outputs.src == 'true' | |
- name: "Build Extractor" | |
if: steps.changes.outputs.src == 'true' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh extensions install github/gh-codeql | |
gh codeql set-version latest | |
./scripts/create-extractor-pack.sh | |
gh codeql resolve languages --format=json --search-path ./extractor-pack | |
- name: "Download Extracter" | |
if: steps.changes.outputs.src == 'false' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release list -L 1 -R "advanced-security/codeql-extractor-iac" | |
gh release download \ | |
-R "advanced-security/codeql-extractor-iac" \ | |
--clobber \ | |
--pattern 'extractor-iac.tar.gz' | |
tar -zxf extractor-iac.tar.gz | |
# cache the extractor pack | |
- name: Cache Extractor Pack | |
uses: actions/cache@v4 | |
with: | |
path: extractor-pack | |
key: extractor-pack | |
tests: | |
runs-on: ubuntu-latest | |
needs: [extractor] | |
strategy: | |
matrix: | |
test-folders: ["library-tests", "queries-tests"] | |
steps: | |
- uses: actions/checkout@v4 | |
# download from cache | |
- name: "Download from cache" | |
uses: actions/cache@v4 | |
with: | |
path: extractor-pack | |
key: extractor-pack | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | |
id: changes | |
with: | |
filters: | | |
src: | |
- 'ql/**' | |
- name: "Run Tests" | |
if: steps.changes.outputs.src == 'true' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
./scripts/run-tests.sh "ql/test/${{ matrix.test-folders }}" | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | |
id: changes | |
with: | |
filters: | | |
src: | |
- '**.md' | |
# lint markdown | |
- name: "Lint Markdown" | |
if: steps.changes.outputs.src == 'true' | |
run: | | |
npm install -g markdownlint-cli | |
markdownlint '**.md' --ignore node_modules --disable MD013 | |
action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | |
id: changes | |
with: | |
filters: | | |
src: | |
- '.github/action/**' | |
- 'action.yml' | |
- name: Run action | |
if: steps.changes.outputs.src == 'true' | |
uses: ./ | |
with: | |
extractor-version: latest |