developer workflow #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "developer workflow" | |
| on: | |
| push: | |
| branches: | |
| - developer/v1.0 | |
| workflow_dispatch: | |
| permissions: | |
| contents: read # Required for actions/checkout | |
| security-events: write # Required for github/codeql-action/upload-sarif@v3 | |
| jobs: | |
| pr-job: | |
| runs-on: self-hosted | |
| steps: | |
| # --- Order Service Build and Scan --- | |
| - name: Build and export order service to Docker | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./src/order-service | |
| load: true # Exports the image to the local Docker daemon for Trivy scanning | |
| tags: shaikkhajaibrahim/devorder-service:latest | |
| push: true | |
| # --- Product Service Build and Scan --- | |
| - name: Build and export product service to Docker | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./src/product-service | |
| load: true | |
| tags: shaikkhajaibrahim/devproduct-service | |
| # --- Store Front Service Build and Scan --- | |
| - name: Build and export store front service to Docker | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./src/store-front | |
| load: true | |
| tags: shaikkhajaibrahim/devstore-front | |
| push: true | |
| - name: Run Trivy vulnerability scan for store | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: store-front | |
| format: "sarif" | |
| output: "store-trivy-results.sarif" |