Update OS baseline and reduce container attack surface #48
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: Docker Build Check | |
| on: | |
| push: | |
| branches: | |
| - "**" # Run on every branch push | |
| - "!main" # EXCEPT when pushing to main (handled by PR merge) | |
| paths: | |
| - "PatchPanda.Web/**" | |
| - "Dockerfile" | |
| - ".github/workflows/docker-build.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "PatchPanda.Web/**" | |
| - "Dockerfile" | |
| - ".github/workflows/docker-build.yml" | |
| workflow_dispatch: | |
| # Cancels the older run if a new commit is pushed while a build is already active for that same branch/PR. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
| file: ./Dockerfile | |
| push: false # We only want to test the build, not push it | |
| tags: patchpanda:test | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |