|
| 1 | +name: "aws-lambda-ruby-patched:3.2" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - "./Dockerfile-ruby3.2-patched" |
| 7 | + |
| 8 | +jobs: |
| 9 | + build-and-push: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - name: Checkout code |
| 13 | + uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: Set up QEMU (for emulation) |
| 16 | + uses: docker/setup-qemu-action@v3 |
| 17 | + |
| 18 | + - name: Set up Docker Buildx |
| 19 | + uses: docker/setup-buildx-action@v3 |
| 20 | + with: |
| 21 | + driver: docker-container |
| 22 | + driver-opts: image=moby/buildkit:master |
| 23 | + |
| 24 | + - name: Log in to Docker Hub Container Registry |
| 25 | + uses: docker/login-action@v3 |
| 26 | + with: |
| 27 | + username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 28 | + password: ${{ secrets.DOCKER_HUB_PASSWORD }} |
| 29 | + |
| 30 | + - name: Build and push Docker image |
| 31 | + uses: docker/build-push-action@v6 |
| 32 | + with: |
| 33 | + context: . |
| 34 | + file: ./bigquery/Dockerfile4parquet |
| 35 | + push: true |
| 36 | + platforms: linux/amd64,linux/arm64 |
| 37 | + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ inputs.job-name }} |
| 38 | + - name: Scan |
| 39 | + id: scan |
| 40 | + uses: anchore/scan-action@v6 |
| 41 | + continue-on-error: true |
| 42 | + with: |
| 43 | + image: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ inputs.job-name }} |
| 44 | + fail-build: true |
| 45 | + output-format: sarif |
| 46 | + severity-cutoff: low |
| 47 | + add-cpes-if-none: true |
| 48 | + - name: Update PR with vulnerability scan results |
| 49 | + uses: forward3d/comment-failure-details@v1.0.0 |
| 50 | + with: |
| 51 | + report: ${{ steps.scan.outputs.sarif }} |
| 52 | + image-name: ${{ inputs.job-name }} |
0 commit comments