diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index baee7a851..3e694aa3b 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -56,6 +56,19 @@ jobs: - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + - name: '@basemaps/cli - Build and export to Docker' + uses: docker/build-push-action@v5 + with: + context: packages/cli + load: true + tags: | + ghcr.io/linz/basemaps/cli:latest + ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version }} + + - name: '@basemaps/cli - Test' + run: | + docker run --rm ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version }} --help + - name: '@basemaps/cli - Build and push' uses: docker/build-push-action@v5 with: @@ -77,9 +90,21 @@ jobs: ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version_major }} ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version_major_minor }} ghcr.io/linz/basemaps/cli:${{ steps.version.outputs.version }} - push: ${{github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'release:')}} + - name: '@basemaps/server - Build and export to Docker' + uses: docker/build-push-action@v5 + with: + context: packages/server + load: true + tags: | + ghcr.io/linz/basemaps/server:latest + ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version }} + + - name: '@basemaps/server - Test' + run: | + docker run --rm ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version }} --version + - name: '@basemaps/server - Build and push' uses: docker/build-push-action@v5 with: @@ -102,3 +127,4 @@ jobs: ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version_major_minor }} ghcr.io/linz/basemaps/server:${{ steps.version.outputs.version }} push: ${{github.ref == 'refs/heads/master' && startsWith(github.event.head_commit.message, 'release:')}} + diff --git a/packages/cli/Dockerfile b/packages/cli/Dockerfile index 3ba8ea493..c436f6e51 100644 --- a/packages/cli/Dockerfile +++ b/packages/cli/Dockerfile @@ -21,11 +21,12 @@ RUN npm install sharp@0.33.0 COPY ./basemaps-landing*.tgz /app/ COPY ./basemaps-cogify*.tgz /app/ COPY ./basemaps-smoke*.tgz /app/ +COPY ./basemaps-server*.tgz /app/ # Copy the static files for v1/health check COPY ./static/ /app/static/ -RUN npm install ./basemaps-landing*.tgz ./basemaps-cogify*.tgz ./basemaps-smoke*.tgz +RUN npm install ./basemaps-landing*.tgz ./basemaps-cogify*.tgz ./basemaps-smoke*.tgz ./basemaps-server*.tgz COPY dist/index.cjs /app/