Skip to content

Commit

Permalink
build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Jan 14, 2024
1 parent 7d49094 commit 3f9b31d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 18 deletions.
8 changes: 8 additions & 0 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:20-alpine

COPY build-artifacts /code

WORKDIR /code/web
RUN yarn install

ENTRYPOINT [ "yarn", "run", "start" ]
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,48 @@ jobs:
napi-pallas/yarn.lock
napi-pallas/*.node
napi-pallas/npm
docker:
runs-on: ubuntu-latest
needs: [build]

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/txpipe/laceanatomy
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{version}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io/txpipe
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download artifacts
uses: actions/download-artifact@v3

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: .github/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
18 changes: 0 additions & 18 deletions Dockerfile

This file was deleted.

0 comments on commit 3f9b31d

Please sign in to comment.