Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build for http server too #184

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

docker-image:
docker-image-grid-client:
needs: build
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -70,4 +70,36 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GRID3_CLIENT_VERSION=${{ steps.meta.outputs.version }}
GRID_VERSION=${{ steps.meta.outputs.version }}

docker-image-grid-http-server:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/threefoldtech/grid_http_server
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: packages/grid_http_server
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GRID_VERSION=${{ steps.meta.outputs.version }}
4 changes: 2 additions & 2 deletions packages/grid_client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine

ARG GRID3_CLIENT_VERSION
RUN apk add nodejs npm curl && npm install --global yarn && yarn add @threefold/grid_client@${GRID3_CLIENT_VERSION}
ARG GRID_VERSION
RUN apk add nodejs npm curl && npm install --global yarn && yarn add @threefold/grid_client@${GRID_VERSION}

ENTRYPOINT [ "yarn" ]
6 changes: 6 additions & 0 deletions packages/grid_http_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM alpine

ARG GRID_VERSION
RUN apk add nodejs npm curl && npm install --global yarn && yarn add @threefold/grid_http_server@${GRID_VERSION}

ENTRYPOINT [ "yarn" ]