diff --git a/.github/workflows/pr_ms.yml b/.github/workflows/pr_ms.yml index 00f3ae900..960833938 100644 --- a/.github/workflows/pr_ms.yml +++ b/.github/workflows/pr_ms.yml @@ -29,3 +29,28 @@ jobs: source_branch: ${{ github.head_ref }} target_branch: ${{ github.base_ref }} sonar_key: 'pagopa_selfcare-onboarding' + + build_docker: + name: 'Build Docker image' + runs-on: ubuntu-20.04 + permissions: + packages: write + + steps: + + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 + name: Checkout + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + + - name: Build Image + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 #v5.1.0 + with: + context: . + file: ./apps/onboarding-ms/Dockerfile + push: false + secrets: | + GH_TOKEN=${{ secrets.READ_PACKAGES_TOKEN }} + cache-from: type=gha + cache-to: type=gha,mode=min