Revert "Add manual instrumentation to tracing (#175)" #183
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
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - "**/*.md" | |
| - "Makefile" | |
| - ".mvn" | |
| - ".gitignore" | |
| env: | |
| DAPLA_REGISTRY: europe-north1-docker.pkg.dev/${{secrets.GAR_PROJECT_ID}}/dapla-stat-docker | |
| jobs: | |
| build-test: | |
| name: Build and test with Maven | |
| if: ${{github.event_name == 'pull_request'}} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fail build on High/Critical Vulnerabilities | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: 'fs' | |
| format: 'table' | |
| scan-ref: '.' | |
| severity: 'HIGH,CRITICAL' | |
| ignore-unfixed: true | |
| exit-code: 1 | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: 'fs' | |
| ignore-unfixed: true | |
| scan-ref: '.' | |
| format: 'sarif' | |
| output: 'trivy-results.sarif' | |
| severity: 'CRITICAL,HIGH' | |
| skip-setup-trivy: true | |
| - name: Upload Trivy results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: 'trivy-results.sarif' | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| cache: maven | |
| - name: Setup Maven authentication to GitHub packages | |
| uses: s4u/maven-settings-action@v3.1.0 | |
| id: maven_settings | |
| with: | |
| override: true | |
| servers: | | |
| [ | |
| { | |
| "id": "ssb-datadoc-model", | |
| "username": "${{ github.actor }}", | |
| "password": "${{ secrets.GITHUB_TOKEN }}" | |
| } | |
| ] | |
| - name: Authenticate to Google Cloud | |
| id: auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: "projects/${{secrets.GAR_PROJECT_NUMBER}}/locations/global/workloadIdentityPools/gh-actions/providers/gh-actions" | |
| service_account: "gh-actions-dapla-stat@${{secrets.GAR_PROJECT_ID}}.iam.gserviceaccount.com" | |
| token_format: access_token | |
| - name: Login to Artifact Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.DAPLA_REGISTRY }} | |
| username: "oauth2accesstoken" | |
| password: "${{ steps.auth.outputs.access_token }}" | |
| - name: Maven build and install | |
| shell: bash | |
| run: mvn --batch-mode clean install |