Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoGuedes01 committed Oct 17, 2023
1 parent 101b4f9 commit db43163
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
NPM_TOKEN: ${{ secrets.ACTION_TOKEN }}
run: npx semantic-release

- name: Authenticate Github Container Registry
uses: docker/login-action@v1

publish-gpr:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.ACTION_TOKEN }}
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Extract release version
id: version
run: echo ::set-output name=version::$(npx semantic-release --dry-run | grep "version")

- name: Build and Publish the Docker Image
run: |
docker build -t ghcr.io/abi-interoperability-thesis/preprocessing-webservice:${{ steps.version.outputs.version }} .
docker push ghcr.io/abi-interoperability-thesis/preprocessing-webservice:${{ steps.version.outputs.version }}

0 comments on commit db43163

Please sign in to comment.