Skip to content

Merge pull request #48 from HCL-TECH-SOFTWARE/rwilkins108-patch-1 #28

Merge pull request #48 from HCL-TECH-SOFTWARE/rwilkins108-patch-1

Merge pull request #48 from HCL-TECH-SOFTWARE/rwilkins108-patch-1 #28

Workflow file for this run

name: Push Snapshot to Github registry
on:
workflow_dispatch:
push:
branches:
- main
jobs:
publish:
name: Deploy Snapshot to ghcr.io
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
- name: Extract Project version
id: project
run: echo "MVN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: set productName for Snapshot
if: endsWith(env.MVN_VERSION, '-SNAPSHOT')
run: echo "PRODUCT_NAME=HCL Labs Project KEEP" >> $GITHUB_ENV
- name: Determine productName for release
if: ${{ ! endsWith(env.MVN_VERSION, '-SNAPSHOT')}}
run: echo "PRODUCT_NAME=HCL Labs Project KEEP $MVN_VERSION" >> $GITHUB_ENV
- name: Check env variables
run: echo version = $MVN_VERSION, product = $PRODUCT_NAME
- run: mvn --no-transfer-progress clean
- run: npm ci
- run: npm run build
- run: npm run test
- name: Run Mend Scan
uses: TheAxZim/[email protected]
with:
wssURL: https://saas.whitesourcesoftware.com/agent
apiKey: ${{ secrets.WSS_API_KEY }}
productName: ${{ env.PRODUCT_NAME }}
projectName: 'domino-keep-admin-ui'
- name: Publish only Snapshot to GitHub Packages
if: endsWith(env.MVN_VERSION, '-SNAPSHOT')
run: mvn --no-transfer-progress deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}