From 4a38a983db18cc327403a09754d979d181c67f6b Mon Sep 17 00:00:00 2001 From: Andrea Grillo Date: Tue, 23 Jan 2024 15:52:35 +0100 Subject: [PATCH] [EC-95] Add job to build Docker image at PR validation for onboarding ms (#108) --- .github/workflows/pr_ms.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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