|
5 | 5 | branches: |
6 | 6 | - 'master' |
7 | 7 | - 'v5.*' |
| 8 | + paths: |
| 9 | + - 'mcp_server/**' |
| 10 | + - '.github/workflows/mcp-container-checks.yml' |
8 | 11 | pull_request: |
9 | 12 | branches: |
10 | 13 | - 'master' |
11 | 14 | - 'v5.*' |
| 15 | + paths: |
| 16 | + - 'mcp_server/**' |
| 17 | + - '.github/workflows/mcp-container-checks.yml' |
12 | 18 |
|
13 | 19 | concurrency: |
14 | 20 | group: ${{ github.workflow }}-${{ github.ref }} |
|
56 | 62 |
|
57 | 63 | mcp-container-build-and-scan: |
58 | 64 | if: github.repository == 'prowler-cloud/prowler' |
59 | | - runs-on: ${{ matrix.runner }} |
60 | | - strategy: |
61 | | - matrix: |
62 | | - include: |
63 | | - - platform: linux/amd64 |
64 | | - runner: ubuntu-latest |
65 | | - arch: amd64 |
66 | | - - platform: linux/arm64 |
67 | | - runner: ubuntu-24.04-arm |
68 | | - arch: arm64 |
| 65 | + runs-on: ubuntu-latest |
69 | 66 | timeout-minutes: 30 |
70 | 67 | permissions: |
71 | 68 | contents: read |
@@ -112,23 +109,22 @@ jobs: |
112 | 109 | if: steps.check-changes.outputs.any_changed == 'true' |
113 | 110 | uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 |
114 | 111 |
|
115 | | - - name: Build MCP container for ${{ matrix.arch }} |
| 112 | + - name: Build MCP container |
116 | 113 | if: steps.check-changes.outputs.any_changed == 'true' |
117 | 114 | uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 |
118 | 115 | with: |
119 | 116 | context: ${{ env.MCP_WORKING_DIR }} |
120 | 117 | push: false |
121 | 118 | load: true |
122 | | - platforms: ${{ matrix.platform }} |
123 | | - tags: ${{ env.IMAGE_NAME }}:${{ github.sha }}-${{ matrix.arch }} |
124 | | - cache-from: type=gha,scope=${{ matrix.arch }} |
125 | | - cache-to: type=gha,mode=max,scope=${{ matrix.arch }} |
| 119 | + tags: ${{ env.IMAGE_NAME }}:${{ github.sha }} |
| 120 | + cache-from: type=gha |
| 121 | + cache-to: type=gha,mode=${{ github.event_name == 'pull_request' && 'min' || 'max' }} |
126 | 122 |
|
127 | | - - name: Scan MCP container with Trivy for ${{ matrix.arch }} |
| 123 | + - name: Scan MCP container with Trivy |
128 | 124 | if: steps.check-changes.outputs.any_changed == 'true' |
129 | 125 | uses: ./.github/actions/trivy-scan |
130 | 126 | with: |
131 | 127 | image-name: ${{ env.IMAGE_NAME }} |
132 | | - image-tag: ${{ github.sha }}-${{ matrix.arch }} |
| 128 | + image-tag: ${{ github.sha }} |
133 | 129 | fail-on-critical: 'false' |
134 | 130 | severity: 'CRITICAL' |
0 commit comments