build(deps): bump github/codeql-action from 4 to 4.37.4 #166
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
| --- | |
| name: CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - master | |
| - mainline | |
| - rb/* | |
| permissions: | |
| contents: read | |
| security-events: write | |
| env: | |
| IMAGE_NAME: nginx-brotli | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v4.2.0 | |
| - name: Build amd64 image | |
| uses: docker/build-push-action@v7.3.0 | |
| with: | |
| builder: ${{ steps.buildx.outputs.name }} | |
| context: . | |
| platforms: linux/amd64 | |
| push: false | |
| tags: ${{ env.IMAGE_NAME }} | |
| load: true | |
| cache-from: type=local,src=/tmp/.buildx-cache | |
| cache-to: type=local,dest=/tmp/.buildx-cache | |
| - name: Test | |
| run: | | |
| docker run --rm -v $(pwd)/tests.sh:/tests.sh --entrypoint sh nginx-brotli /tests.sh | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: ${{ env.IMAGE_NAME }} | |
| exit-code: '1' # This will fail the pipeline if vulnerabilities are found | |
| ignore-unfixed: true | |
| vuln-type: 'os,library' | |
| severity: 'CRITICAL,HIGH' | |
| format: 'sarif' | |
| output: 'trivy-results.sarif' | |
| - name: Upload to GitHub Security | |
| uses: github/codeql-action/upload-sarif@v4.37.4 | |
| if: always() | |
| with: | |
| sarif_file: 'trivy-results.sarif' |