diff --git a/.github/workflows/frontend-build-prod.yml b/.github/workflows/frontend-build-prod.yml index 4cdc7d8..ebf16cd 100644 --- a/.github/workflows/frontend-build-prod.yml +++ b/.github/workflows/frontend-build-prod.yml @@ -10,6 +10,8 @@ on: required: true ACTIVE_MQ_ADMIN_PASSWORD: required: true + NODE_VERSION: + required: true jobs: build: @@ -22,10 +24,12 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node 21 + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 21 + node-version: $NODE_VERSION + env: + NODE_VERSION: ${{ secrets.NODE_VERSION }} - name: Run NPM install run: | @@ -38,7 +42,7 @@ jobs: NPM_NEXUS_AUTH: ${{ secrets.NPM_NEXUS_AUTH }} - name: Run NPM build - run: npm run build + run: npm run build-prod - name: Setup AWS Cli run: | diff --git a/.github/workflows/frontend-build-test.yml b/.github/workflows/frontend-build-test.yml index b4f42bb..8be2597 100644 --- a/.github/workflows/frontend-build-test.yml +++ b/.github/workflows/frontend-build-test.yml @@ -10,6 +10,11 @@ on: required: true ACTIVE_MQ_ADMIN_PASSWORD: required: true + BUILD_SCRIPT_NAME: + required: true + NODE_VERSION: + required: true + jobs: build: @@ -22,10 +27,12 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node 21 + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 21 + node-version: $NODE_VERSION + env: + NODE_VERSION: ${{ secrets.NODE_VERSION }} - name: Set current date as env variable run: echo "NOW=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV @@ -41,7 +48,9 @@ jobs: NPM_NEXUS_AUTH: ${{ secrets.NPM_NEXUS_AUTH }} - name: Run NPM build - run: npm run build + run: npm run $BUILD_SCRIPT_NAME + env: + BUILD_SCRIPT_NAME: ${{ secrets.BUILD_SCRIPT_NAME }} - name: Setup AWS Cli run: |