mirror of
https://github.com/github/codeql-action.git
synced 2026-08-05 13:02:04 -05:00
8a0be82efa
Bumps the actions-minor group with 3 updates in the /.github/workflows directory: [actions/checkout](https://github.com/actions/checkout), [actions/setup-java](https://github.com/actions/setup-java) and [ruby/setup-ruby](https://github.com/ruby/setup-ruby). Updates `actions/checkout` from 7.0.0 to 7.0.1 - [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/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `actions/setup-java` from 5.5.0 to 5.6.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/0f481fcb613427c0f801b606911222b5b6f3083a...03ad4de0992f5dab5e18fcb136590ce7c4a0ac95) Updates `ruby/setup-ruby` from 1.316.0 to 1.319.0 - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/d45b1a4e94b71acab930e56e79c6aa188764e7f9...003a5c4d8d6321bd302e38f6f0ec593f77f06600) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor - dependency-name: actions/setup-java dependency-version: 5.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor - dependency-name: ruby/setup-ruby dependency-version: 1.319.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-minor ... Signed-off-by: dependabot[bot] <support@github.com>
118 lines
3.7 KiB
YAML
118 lines
3.7 KiB
YAML
# Checks logs, SARIF, and database bundle debug artifacts exist
|
|
# when the analyze step fails.
|
|
name: PR Check - Debug artifacts after failure
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- releases/v*
|
|
pull_request:
|
|
merge_group:
|
|
types: [checks_requested]
|
|
schedule:
|
|
- cron: '0 5 * * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
upload-artifacts:
|
|
if: github.triggering_actor != 'dependabot[bot]'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version:
|
|
- stable-v2.20.3
|
|
- default
|
|
- linked
|
|
- nightly-latest
|
|
name: Upload debug artifacts after failure in analyze
|
|
continue-on-error: true
|
|
env:
|
|
CODEQL_ACTION_TEST_MODE: true
|
|
permissions:
|
|
contents: read
|
|
# We currently need `security-events: read` to access feature flags.
|
|
security-events: read
|
|
timeout-minutes: 45
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Dump GitHub event
|
|
run: cat "${GITHUB_EVENT_PATH}"
|
|
- name: Check out repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Prepare test
|
|
id: prepare-test
|
|
uses: ./.github/actions/prepare-test
|
|
with:
|
|
version: ${{ matrix.version }}
|
|
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
|
with:
|
|
go-version: ^1.13.1
|
|
- name: Install .NET
|
|
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
|
|
with:
|
|
dotnet-version: '9.x'
|
|
- name: Assert best-effort artifact scan completed
|
|
uses: ./../action/.github/actions/verify-debug-artifact-scan-completed
|
|
- uses: ./../action/init
|
|
with:
|
|
languages: cpp,csharp,go,java,javascript,python
|
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
debug: true
|
|
debug-artifact-name: my-debug-artifacts
|
|
debug-database-name: my-db
|
|
- name: Build code
|
|
run: ./build.sh
|
|
- uses: ./../action/analyze
|
|
id: analysis
|
|
env:
|
|
# Forces a failure in this step.
|
|
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
|
with:
|
|
expect-error: true
|
|
download-and-check-artifacts:
|
|
name: Download and check debug artifacts after failure in analyze
|
|
if: github.triggering_actor != 'dependabot[bot]'
|
|
needs: upload-artifacts
|
|
timeout-minutes: 45
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
- name: Check expected artifacts exist
|
|
run: |
|
|
LANGUAGES="cpp csharp go java javascript python"
|
|
for version in $VERSIONS; do
|
|
echo "Artifacts from version $version:"
|
|
pushd "./my-debug-artifacts-${version//./}"
|
|
for language in $LANGUAGES; do
|
|
echo "- Checking $language"
|
|
if [[ ! -f "my-db-$language-partial.zip" ]] ; then
|
|
echo "Missing a partial database bundle for $language"
|
|
exit 1
|
|
fi
|
|
if [[ ! -d "log" ]] ; then
|
|
echo "Missing database initialization logs"
|
|
exit 1
|
|
fi
|
|
if [[ ! "$language" == "go" ]] && [[ ! -d "$language/log" ]] ; then
|
|
echo "Missing logs for $language"
|
|
exit 1
|
|
fi
|
|
done
|
|
popd
|
|
done
|
|
env:
|
|
GO111MODULE: auto
|