Add publish action #10
Workflow file for this run
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
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: '@insight-platform' | |
- 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 @insight-platform:registry=https://npm.pkg.github.com; npm config set -- '//npm.pkg.github.com/:_authToken' '${{ secrets.GITHUB_TOKEN }}'; npm publish" |