diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d71f474 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +"on": + push: + branches: [main, dev] + pull_request: + branches: [main, dev] + +jobs: + build: + runs-on: ubuntu-latest + env: + SPRING_PROFILES_ACTIVE: dev + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + cache: gradle + - run: chmod +x gradlew + - run: ./gradlew build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..1963a44 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,42 @@ +name: CodeQL + +"on": + push: + branches: [main, dev] + pull_request: + branches: [main, dev] + schedule: + - cron: "45 15 * * 1" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [java] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Java 17 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + cache: gradle + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: manual + - name: Assemble + run: | + chmod +x gradlew + ./gradlew assemble --no-daemon + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/sonarqube-analysis.yml b/.github/workflows/sonarqube-analysis.yml deleted file mode 100644 index 295cd10..0000000 --- a/.github/workflows/sonarqube-analysis.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Sonarqube - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - env: - SPRING_PROFILES_ACTIVE: dev - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Cache SonarCloud packages - uses: actions/cache@v4 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Set up Java 17 - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: '17' - cache: 'gradle' - - - name: Analyze - env: - GITHUB_TOKEN: ${{ secrets.TOKEN_FOR_WORKFLOWS }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew sonarqube --info --no-daemon