Skip to content

Commit

Permalink
enable vuln scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
CubicrootXYZ committed Oct 26, 2024
1 parent 66688d4 commit 9d7feb6
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,44 @@ permissions:

jobs:
golang_quality:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].12
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].14

golang_test:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].12
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].14
needs: [build_openapi_spec] # Validates agains OpenAPI spec
with:
services: '{"database": {"image": "mysql:9.0", "ports": ["3306:3306"], "env": {"MYSQL_ROOT_PASSWORD": "mypass", "MYSQL_DATABASE": "remindme"}}}'
env: '{"TEST_DB_HOST": "database"}'

build_openapi_spec:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].12
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].14
with:
entrypoint: cmd/remindme/main.go

render_openapi_spec:
needs: [build_openapi_spec]
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].12
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].14
with:
spec_artifact_name: openapi-spec
spec_artifact_path: docs/
spec_filename: swagger.yaml

deploy_openapi_spec:
needs: [render_openapi_spec]
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].12
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].14
with:
artifact_name: rendered-api-docu
artifact_path: index.html

build_image:
needs: [golang_test, golang_quality, render_openapi_spec]
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].12
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].14
with:
docker_build_args: "--no-cache"
docker_file_path: "./"
image_name: "cubicrootxyz/remindme"
static_tag: "beta"
vuln_scan: true
secrets:
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

scan_image:
uses: anchore/scan-action@v3
with:
image: "cubicrootxyz/remindme:${{ github.sha }}"

0 comments on commit 9d7feb6

Please sign in to comment.