Merge pull request #311 from arnested/dependabot/github_actions/actio… #566
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: push | |
| name: Docker image security scan | |
| permissions: | |
| security-events: write | |
| actions: read | |
| jobs: | |
| security-scan: | |
| name: Docker build and scan | |
| if: '!github.event.deleted' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@master | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| builder: ${{ steps.buildx.outputs.name }} | |
| tags: ${{ github.repository }}:test | |
| push: false | |
| load: true | |
| - name: Scan Docker image | |
| uses: anchore/scan-action@v7 | |
| id: scan | |
| with: | |
| image: ${{ github.repository }}:test | |
| acs-report-enable: true | |
| fail-build: true | |
| - name: Upload Anchore scan SARIF report | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: ${{ always() }} | |
| with: | |
| sarif_file: ${{ steps.scan.outputs.sarif }} |