|
9 | 9 |
|
10 | 10 | jobs: |
11 | 11 | build: |
12 | | - runs-on: ubuntu-20.04 |
| 12 | + runs-on: ubuntu-22.04 |
13 | 13 | steps: |
14 | 14 | # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation |
15 | 15 | - name: Check out code |
16 | | - uses: actions/checkout@v2.3.4 |
| 16 | + uses: actions/checkout@v3 |
17 | 17 | with: |
18 | 18 | ref: ${{github.event.pull_request.head.ref}} |
19 | 19 | repository: ${{github.event.pull_request.head.repo.full_name}} |
20 | 20 | fetch-depth: 0 |
21 | | - |
22 | | - - name: create checksum file |
23 | | - uses: hypertrace/github-actions/checksum@main |
24 | | - |
25 | | - - name: Cache packages |
26 | | - uses: actions/cache@v2 |
27 | | - with: |
28 | | - path: ~/.gradle |
29 | | - key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }} |
30 | | - restore-keys: | |
31 | | - gradle-packages-${{ runner.os }}-${{ github.job }} |
32 | | - gradle-packages-${{ runner.os }} |
33 | 21 |
|
34 | 22 | - name: Login to Docker Hub |
35 | | - uses: docker/login-action@v1 |
| 23 | + uses: docker/login-action@v2 |
36 | 24 | with: |
37 | 25 | username: ${{ secrets.DOCKERHUB_READ_USER }} |
38 | 26 | password: ${{ secrets.DOCKERHUB_READ_TOKEN }} |
39 | 27 |
|
40 | 28 | - name: Build with Gradle |
41 | 29 | uses: hypertrace/github-actions/gradle@main |
42 | 30 | with: |
43 | | - args: build dockerBuildImages |
| 31 | + args: assemble dockerBuildImages |
44 | 32 |
|
45 | | - - name: Determine docker tag |
46 | | - id: tag |
47 | | - run: echo ::set-output name=tag::$(./gradlew -q printDockerImageDefaultTag | head -1) |
48 | | - |
49 | | - - name: Scan docker image |
50 | | - uses: azure/container-scan@v0.1 |
| 33 | + - name: Run Trivy vulnerability scanner |
| 34 | + uses: hypertrace/github-actions/trivy-image-scan@main |
51 | 35 | with: |
52 | | - image-name: hypertrace/attribute-service:${{ steps.tag.outputs.tag }} |
53 | | - env: |
54 | | - DOCKLE_HOST: "unix:///var/run/docker.sock" |
55 | | - continue-on-error: true |
| 36 | + image: hypertrace/attribute-service |
56 | 37 |
|
57 | 38 | validate-helm-charts: |
58 | | - runs-on: ubuntu-20.04 |
| 39 | + runs-on: ubuntu-22.04 |
59 | 40 | steps: |
60 | 41 | - name: Check out code |
61 | | - uses: actions/checkout@v2.3.4 |
| 42 | + uses: actions/checkout@v3 |
62 | 43 | with: |
63 | 44 | ref: ${{github.event.pull_request.head.ref}} |
64 | 45 | repository: ${{github.event.pull_request.head.repo.full_name}} |
65 | 46 | fetch-depth: 0 |
66 | 47 |
|
67 | 48 | - name: validate charts |
68 | 49 | uses: hypertrace/github-actions/validate-charts@main |
69 | | - |
70 | | - snyk-scan: |
71 | | - runs-on: ubuntu-20.04 |
72 | | - steps: |
73 | | - # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation |
74 | | - - name: Check out code |
75 | | - uses: actions/checkout@v2.3.4 |
76 | | - with: |
77 | | - ref: ${{github.event.pull_request.head.ref}} |
78 | | - repository: ${{github.event.pull_request.head.repo.full_name}} |
79 | | - fetch-depth: 0 |
80 | | - - name: Setup snyk |
81 | | - uses: snyk/actions/setup@0.3.0 |
82 | | - - name: Snyk test |
83 | | - run: snyk test --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching='^runtimeClasspath$' --remote-repo-url='${{ github.server_url }}/${{ github.repository }}.git' |
84 | | - env: |
85 | | - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
0 commit comments