set up workflow for tag #1
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: Frontend & Docker CI Workflow | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
get-npm-package-version: | |
runs-on: ubuntu-latest | |
outputs: | |
package_version: ${{ steps.get_version.outputs.package_version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check is Lerna project | |
run: | | |
if [ -f lerna.json ]; then | |
echo "Project is a Lerna project." | |
echo "IS_LERNA=true" >> $GITHUB_ENV | |
else | |
echo "Project is NOT a Lerna project." | |
echo "IS_LERNA=false" >> $GITHUB_ENV | |
fi | |
- name: Get package version | |
id: get_version | |
run: | | |
if [ "$IS_LERNA" == "true" ]; then | |
VERSION=$(lerna list --json | jq -r '.[0].version') | |
else | |
VERSION=$(jq -r '.version' package.json) | |
fi | |
echo "package_version=$VERSION" >> $GITHUB_OUTPUT | |
call-docker-ci-workflow: | |
needs: get-npm-package-version | |
uses: netcracker/qubership-apihub-ci/.github/workflows/docker-ci.yml@main | |
with: | |
name: qubership-apihub-ui | |
file: Dockerfile | |
context: "" | |
platforms: linux/amd64,linux/arm64 | |
labels: | | |
maintainer=qubership | |
npm-package-version=${{ needs.jobs.get-npm-package-version.outputs.package_version }} | |
secrets: | |
NPMRC: ${{ secrets.NPMRC }} |