From db43163e1ee45582903bd67219c05b9c3978220c Mon Sep 17 00:00:00 2001 From: JoaoGuedes Date: Tue, 17 Oct 2023 20:13:50 +0100 Subject: [PATCH] a --- .github/workflows/build-image.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 010b17a..25a1829 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -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 }}