-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (39 loc) · 1.16 KB
/
push-pr-lint.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
47
48
name: lint, test and build image
on: [pull_request, push]
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run golangci-lint
run: make golangci-lint
- name: Check go generated files
run: make check-go-generated
- name: Run go tests
run: sudo ENABLE_PRIV_TESTS=true make go-test
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
- name: Build image - no push
id: dockerbuild
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: ghcr.io/equinixmetal/ironlib:latest
- name: Scan image
id: scan
uses: anchore/scan-action@v4
with:
image: ghcr.io/equinixmetal/ironlib:latest
acs-report-enable: true
# TODO(jaosorior): Fail build once we migrate off CentOS.
fail-build: false
- name: Inspect action SARIF report
run: cat ${{ steps.scan.outputs.sarif }}
# This should run even if we fail the container scan
if: always()