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 a7e2f2e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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'
registry-url: 'https://npm.pkg.github.com'
scope: '@savant'
- 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
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@savant:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${TOKEN}
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
4 changes: 4 additions & 0 deletions projects/savant-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "@savant/savant-lib",
"version": "0.0.1",
"repository": {
"type": "git",
"url": "https://github.com/insight-platform/SavantMetadataExplorer.git"
},
"exports": {
"./theming": {
"sass": [
Expand Down

0 comments on commit a7e2f2e

Please sign in to comment.