-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refact: CodeQL Analysis * refact: CodeQL Analysis * refact: CodeQL Analysis
- Loading branch information
1 parent
4e1a6f6
commit 4939f6e
Showing
2 changed files
with
69 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CodeQL Analysis | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '36 0 * * 3' # todas as quartas-feiras às 00:36 (meia-noite e 36 minutos) no fuso horário UTC. | ||
|
||
jobs: | ||
analyze: | ||
name: CodeQL Analyze | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
# required to fetch internal or private CodeQL packs | ||
packages: read | ||
|
||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'java-kotlin' ] | ||
# Adicione outras linguagens se houver, como 'javascript', 'python', etc. | ||
build-mode: [ none ] | ||
# Adicione none ou manual dentro do array para cair em alguma execução abaixo. | ||
|
||
steps: | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
|
||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
|
||
- name: Build the code | ||
if: matrix.build-mode == 'none' | ||
run: | | ||
# Comando para rodar o build da aplicação: | ||
mvn clean install -DskipTests -U | ||
- name: Manual Build Commands | ||
if: matrix.build-mode == 'manual' | ||
shell: bash | ||
run: | | ||
echo 'Executando o build manual para análise do CodeQL' | ||
# Comandos específicos para build manual: | ||
mvn clean install -DskipTests -U | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |