Skip to content

Commit 0a815c2

Browse files
committed
test pr build
1 parent 35c42e7 commit 0a815c2

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

.github/workflows/pr-build.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ jobs:
9494
docker run --rm --mount type=bind,source="${GITHUB_WORKSPACE}",target=/project mybuildimage \
9595
/bin/sh -c 'git config --global --add safe.directory /project && dotnet test && ./build.sh'
9696
97+
- name: Perform image scan
98+
uses: ./.github/actions/image_scan
99+
if: ${{ runner.os == 'Linux' }}
100+
with:
101+
image-ref: 'mybuildimage'
102+
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
103+
logout: 'true'
104+
97105
contract-test:
98106
runs-on: ubuntu-latest
99107
steps:
@@ -114,4 +122,29 @@ jobs:
114122
cd test
115123
bash ./build-and-install-distro.sh
116124
bash ./set-up-contract-tests.sh
117-
pytest contract-tests/tests
125+
pytest contract-tests/tests
126+
127+
image-scan:
128+
runs-on: ubuntu-latest
129+
needs: build
130+
steps:
131+
- name: Checkout
132+
uses: actions/checkout@v4
133+
134+
- name: Setup .NET
135+
uses: actions/setup-dotnet@v2
136+
with:
137+
dotnet-version: '8.0.x'
138+
139+
- name: Build artifacts
140+
run: bash build.sh
141+
142+
- name: Build Docker image
143+
run: docker build -t adot-dotnet-instrumentation:pr-${{ github.event.number }} -f Dockerfile.linux .
144+
145+
- name: Scan Docker image
146+
uses: ./.github/actions/image_scan
147+
with:
148+
image-ref: "adot-dotnet-instrumentation:pr-${{ github.event.number }}"
149+
severity: 'CRITICAL,HIGH'
150+
logout: 'true'

0 commit comments

Comments
 (0)