-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.18 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build and Push Docker Images
on:
push:
tags:
- '*'
workflow_dispatch:
env:
IMAGE_NAME: development-idp
DOCKERFILE_PATH: ./Dockerfile
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push main image
uses: docker/build-push-action@v4
with:
context: .
file: ${{ env.DOCKERFILE_PATH }}
push: true
tags: |
ghcr.io/centrefordigitalhumanities/development-idp/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
- name: Grype Scan
id: scan
uses: anchore/scan-action@v3
with:
image: ghcr.io/centrefordigitalhumanities/development-idp/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
fail-build: false
- name: upload Grype SARIF report
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.scan.outputs.sarif }}