Skip to content

Commit

Permalink
Add publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ksenya Arysheva committed Nov 21, 2023
1 parent 5db6310 commit d0f5390
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docker Image CI

on:
push:
branches: [ "github-actions" ]
pull_request:
branches: [ "github-actions" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Build the Docker image
run: docker build . --file projects/savant-lib/Dockerfile --tag savant-image
- name: Publish from image
run: docker run savant-image npm publish
8 changes: 8 additions & 0 deletions projects/savant-lib/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:18.17.1
WORKDIR /tmp/savant-lib
COPY package.json package-lock.json /tmp/savant-lib/
RUN npm install
COPY . /tmp/savant-lib
RUN npm run build:savant-lib

WORKDIR /tmp/savant-lib/dist/savant-lib

0 comments on commit d0f5390

Please sign in to comment.