|
49 | 49 | id: buildx |
50 | 50 | uses: docker/setup-buildx-action@v3 |
51 | 51 |
|
52 | | - - name: Cache Docker layers |
53 | | - uses: actions/cache@v4 |
54 | | - env: |
55 | | - docker-image: ${{ matrix.docker-image }} |
56 | | - with: |
57 | | - path: /tmp/.buildx-cache-${{ env.docker-image }} |
58 | | - key: ${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-${{ env.workflow_name }}-${{ github.sha }}-${{ github.run_id }} |
59 | | - restore-keys: | |
60 | | - ${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-${{ env.workflow_name}}-${{ github.sha }} |
61 | | - ${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-${{ env.workflow_name }} |
62 | | - ${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}- |
63 | | -
|
64 | 52 | - name: Build and push images with debian |
65 | 53 | if: ${{ matrix.os == 'debian' }} |
66 | 54 | uses: docker/build-push-action@v6 |
|
73 | 61 | tags: ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:${{ github.event.inputs.release_number }}-${{ matrix.os }}, ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:${{ github.event.inputs.release_number }}, ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:latest |
74 | 62 | file: ./Dockerfile.${{ env.docker-image }}-${{ matrix.os }} |
75 | 63 | context: . |
76 | | - cache-from: type=local,src=/tmp/.buildx-cache-${{ env.docker-image }} |
77 | | - cache-to: type=local,dest=/tmp/.buildx-cache-${{ env.docker-image }} |
78 | 64 |
|
79 | 65 | - name: Build and push images with alpine |
80 | 66 | if: ${{ matrix.os == 'alpine' }} |
|
88 | 74 | tags: ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:${{ github.event.inputs.release_number }}-${{ matrix.os }} |
89 | 75 | file: ./Dockerfile.${{ env.docker-image }}-${{ matrix.os }} |
90 | 76 | context: . |
91 | | - cache-from: type=local,src=/tmp/.buildx-cache-${{ env.docker-image }} |
92 | | - cache-to: type=local,dest=/tmp/.buildx-cache-${{ env.docker-image }} |
93 | | -# platforms: ${{ matrix.platform }} |
94 | | - |
95 | | - - name: Image digest |
96 | | - run: echo ${{ steps.docker_build.outputs.digest }} |
0 commit comments