-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ksenya Arysheva
committed
Nov 21, 2023
1 parent
5db6310
commit a59968f
Showing
5 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "github-actions" ] | ||
pull_request: | ||
branches: [ "github-actions" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
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 bash -c "npm config set @savant:registry=https://npm.pkg.github.com; npm config set -- '//npm.pkg.github.com/:_authToken' ${TOKEN}; npm publish" | ||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters