diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f3666f38..50fc0646 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -48,7 +48,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} docker: - if: startsWith(github.ref, 'refs/tags') +# if: startsWith(github.ref, 'refs/tags') needs: build runs-on: ubuntu-latest @@ -76,11 +76,15 @@ jobs: - name: Set up docker buildx uses: docker/setup-buildx-action@v3 - + + - name: Download tmc-catalog-cli + run: /bin/sh ./docker/download-cli.sh + - name: Build and push Docker images uses: docker/build-push-action@v5 with: context: . + file: ./docker/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/docker/Dockerfile b/docker/Dockerfile index 1b6ddb9b..a357e748 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,6 @@ FROM alpine:latest RUN mkdir /thingmodels WORKDIR /thingmodels -RUN /bin/sh download-cli.sh +COPY tm-catalog-cli /thingmodels +RUN chmod 755 /thingmodels/tm-catalog-cli ENTRYPOINT ["/thingmodels/tm-catalog-cli", "serve", "--host", "0.0.0.0", "--port", "8080"] diff --git a/docker/download-cli.sh b/docker/download-cli.sh old mode 100644 new mode 100755