Replace Terraform with OpenTofu. Update other tools to latest version #121
Workflow file for this run
This file contains 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: Docker Build and Scan | |
on: | |
push: | |
branches: | |
- master | |
release: | |
types: [published] | |
# Run tests for any PRs. | |
pull_request: | |
# Manual run | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: prime-pipeline | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker image locally | |
run: | | |
if [ -f docker-compose.test.yml ]; then | |
docker-compose --file docker-compose.test.yml build | |
docker-compose --file docker-compose.test.yml run sut | |
else | |
docker build . --file Dockerfile --tag localbuild/testimage:latest | |
fi | |
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled | |
uses: anchore/scan-action@v4 | |
id: scan | |
with: | |
image: "localbuild/testimage:latest" | |
acs-report-enable: true | |
fail-build: false | |
severity-cutoff: high | |
- name: Upload Anchore Scan Report | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ steps.scan.outputs.sarif }} | |
- name: Create software bill of materials when releasing | |
uses: anchore/sbom-action@v0 | |
with: | |
image: localbuild/testimage:latest | |
artifact-name: sbom.spdx | |
if: github.event_name == 'release' |