|
4 | 4 | branches: |
5 | 5 | - main |
6 | 6 | pull_request_target: |
7 | | - branches: |
| 7 | + branches: |
8 | 8 | - main |
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 | | - ref: ${{github.event.pull_request.head.ref}} |
19 | | - repository: ${{github.event.pull_request.head.repo.full_name}} |
20 | 18 | 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 | 19 |
|
34 | 20 | - name: Login to Docker Hub |
35 | | - uses: docker/login-action@v1 |
| 21 | + uses: docker/login-action@v2 |
36 | 22 | with: |
37 | 23 | username: ${{ secrets.DOCKERHUB_READ_USER }} |
38 | 24 | password: ${{ secrets.DOCKERHUB_READ_TOKEN }} |
39 | | - |
| 25 | + |
40 | 26 | - name: Build with Gradle |
41 | 27 | uses: hypertrace/github-actions/gradle@main |
42 | | - with: |
| 28 | + with: |
43 | 29 | args: dockerBuildImages |
44 | 30 |
|
45 | | - - name: Scan docker image |
46 | | - uses: azure/container-scan@v0.1 |
| 31 | + - name: Scan java-11 image |
| 32 | + uses: hypertrace/github-actions/trivy-image-scan@main |
47 | 33 | with: |
48 | | - image-name: hypertrace/java:11 |
49 | | - env: |
50 | | - DOCKLE_HOST: "unix:///var/run/docker.sock" |
51 | | - continue-on-error: true |
| 34 | + image: hypertrace/java |
| 35 | + tag: 11 |
| 36 | + category: java-11 |
| 37 | + output-mode: github |
52 | 38 |
|
53 | | - - name: Scan docker image |
54 | | - uses: azure/container-scan@v0.1 |
| 39 | + - name: Scan java-14 image |
| 40 | + uses: hypertrace/github-actions/trivy-image-scan@main |
55 | 41 | with: |
56 | | - image-name: hypertrace/java:14 |
57 | | - env: |
58 | | - DOCKLE_HOST: "unix:///var/run/docker.sock" |
59 | | - continue-on-error: true |
| 42 | + image: hypertrace/java |
| 43 | + tag: 14 |
| 44 | + category: java-14 |
| 45 | + output-mode: github |
0 commit comments