Skip to content

Commit

Permalink
set up workflow for tag
Browse files Browse the repository at this point in the history
  • Loading branch information
alagishev committed Feb 4, 2025
1 parent c8f4561 commit f4cc317
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-workflow-for-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 }}
5 changes: 1 addition & 4 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: Frontend & Docker CI Workflow

on:
release:
types: [created]
push:
branches:
- main
- release
- develop
- feature/*
tags:
- '**'
delete:
branches:
- release
Expand All @@ -21,6 +17,7 @@ jobs:
uses: netcracker/qubership-apihub-ci/.github/workflows/frontend-ci.yaml@main
call-docker-ci-workflow:
needs: call-frontend-ci-workflow
if: github.event_name == 'push'
uses: netcracker/qubership-apihub-ci/.github/workflows/docker-ci.yml@main
with:
name: qubership-apihub-ui
Expand Down

0 comments on commit f4cc317

Please # to comment.