|
1 | 1 | name: Docker Hub Workflow |
| 2 | +run-name: Docker Hub Workflow |
2 | 3 |
|
3 | 4 | on: |
4 | 5 | workflow_dispatch: |
|
48 | 49 | name: Login to DockerHub |
49 | 50 | if: github.event_name != 'pull_request' |
50 | 51 | run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin |
| 52 | + - |
| 53 | + name: Run trivy scan |
| 54 | + uses: numerique-gouv/action-trivy-cache@main |
| 55 | + with: |
| 56 | + docker-build-args: '--target backend-production -f Dockerfile' |
| 57 | + docker-image-name: 'docker.io/lasuite/impress-backend:${{ github.sha }}' |
51 | 58 | - |
52 | 59 | name: Build and push |
53 | | - uses: docker/build-push-action@v5 |
| 60 | + uses: docker/build-push-action@v6 |
54 | 61 | with: |
55 | 62 | context: . |
56 | 63 | target: backend-production |
|
92 | 99 | name: Login to DockerHub |
93 | 100 | if: github.event_name != 'pull_request' |
94 | 101 | run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin |
| 102 | + - |
| 103 | + name: Run trivy scan |
| 104 | + uses: numerique-gouv/action-trivy-cache@main |
| 105 | + with: |
| 106 | + docker-build-args: '-f src/frontend/Dockerfile --target frontend-production' |
| 107 | + docker-image-name: 'docker.io/lasuite/impress-frontend:${{ github.sha }}' |
95 | 108 | - |
96 | 109 | name: Build and push |
97 | | - uses: docker/build-push-action@v5 |
| 110 | + uses: docker/build-push-action@v6 |
98 | 111 | with: |
99 | 112 | context: . |
100 | 113 | file: ./src/frontend/Dockerfile |
@@ -137,9 +150,15 @@ jobs: |
137 | 150 | name: Login to DockerHub |
138 | 151 | if: github.event_name != 'pull_request' |
139 | 152 | run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin |
| 153 | + - |
| 154 | + name: Run trivy scan |
| 155 | + uses: numerique-gouv/action-trivy-cache@main |
| 156 | + with: |
| 157 | + docker-build-args: '-f src/frontend/Dockerfile --target y-provider' |
| 158 | + docker-image-name: 'docker.io/lasuite/impress-frontend:${{ github.sha }}' |
140 | 159 | - |
141 | 160 | name: Build and push |
142 | | - uses: docker/build-push-action@v5 |
| 161 | + uses: docker/build-push-action@v6 |
143 | 162 | with: |
144 | 163 | context: . |
145 | 164 | file: ./src/frontend/Dockerfile |
|
0 commit comments