feat: hook sinks #68
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: "Build" | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: olafurpg/setup-scala@v11 | |
with: | |
java-version: amazon-corretto@1.17.0-0.35.1 | |
- name: Clean any left-over files | |
run: sbt clean | |
- name: Login to docker | |
run: echo ${{ secrets.PAT }} | docker login ghcr.io --username yomanz --password-stdin | |
- name: Compile and build project | |
run: | | |
sbt clean compile docker:stage | |
cd target/docker/stage | |
docker build -t ghcr.io/widgetbot-io/hookla:${{github.sha}} -t ghcr.io/widgetbot-io/hookla:staging -t ghcr.io/widgetbot-io/hookla:development . | |
- name: Scan current project | |
uses: anchore/scan-action@v3 | |
id: scan | |
with: | |
image: ghcr.io/widgetbot-io/hookla:development | |
fail-build: false | |
acs-report-enable: true | |
- name: Archive security scan results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: anchore-scan-report | |
path: ${{ steps.scan.outputs.sarif }} | |
- name: Upload Anchore scan SARIF report | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: ${{ steps.scan.outputs.sarif }} | |
- name: Push docker image | |
run: | | |
docker push ghcr.io/widgetbot-io/hookla:${{github.sha}} | |
docker push ghcr.io/widgetbot-io/hookla:staging | |
docker push ghcr.io/widgetbot-io/hookla:development |