Skip to content

Merge pull request #4762 from swagger-api/Ticket-4737-removeBrokenRef… #1531

Merge pull request #4762 from swagger-api/Ticket-4737-removeBrokenRef…

Merge pull request #4762 from swagger-api/Ticket-4737-removeBrokenRef… #1531

name: "Code scanning - action"
on:
push:
branches: [master, 1.5]
pull_request:
# The branches below must be a subset of the branches above
branches: [master, 1.5]
schedule:
- cron: '0 19 * * 1'
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
with:
languages: java
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven and Gradle
run: |
./mvnw --no-transfer-progress -B install --file pom.xml
cd ./modules/swagger-gradle-plugin
./gradlew build --info
cd ../..
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3