Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hadjian committed Dec 5, 2023
1 parent 6a7d7db commit c9c3387
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,12 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM alpine:latest
RUN mkdir /thingmodels
WORKDIR /thingmodels
RUN /bin/sh download-cli.sh
ENTRYPOINT ["/thingmodels/tm-catalog-cli", "serve", "--host", "0.0.0.0", "--port", "8080"]
5 changes: 5 additions & 0 deletions docker/download-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/sh

URL=$(curl -s https://api.github.com/repos/web-of-things-open-source/tm-catalog-cli/releases/latest | jq -r '.assets | .[] | select(.name == "tm_catalog_cli-linux_amd64") | .browser_download_url')

curl -OL $URL

0 comments on commit c9c3387

Please sign in to comment.