Skip to content

Commit

Permalink
Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlotfi authored and mrlotfi committed Jul 6, 2024
1 parent 4971e81 commit f9028ac
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Publish Docker Image

on:
push:
branches:
- '*'
- '*/*'
- '**'
- '!main'

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./sdk.Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository_owner }}/driver-sdk:latest
10 changes: 10 additions & 0 deletions sdk.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:20-bullseye-slim As build

WORKDIR /app

COPY package.json package-lock.json ./

RUN npm config set update-notifier false; npm ci --loglevel=error
RUN npm install -g ts-node

COPY . .

0 comments on commit f9028ac

Please sign in to comment.