diff --git a/.github/workflows/publish-hapi-image.yaml b/.github/workflows/publish-hapi-image.yaml index 5bb90c2..5ac509c 100644 --- a/.github/workflows/publish-hapi-image.yaml +++ b/.github/workflows/publish-hapi-image.yaml @@ -18,17 +18,27 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Set up Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: '21' + + # ✅ THIS WAS MISSING + - name: Build validation JAR + run: mvn -B -ntp package + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Log in to GHCR - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push image (latest) + - name: Build and push image (latest) run: | IMAGE=ghcr.io/nhsdigital/validation-service-fhir-r4:latest docker build -t $IMAGE .