From 4f3418f5445aad0f12e0838c2f877b81dcf4f53f Mon Sep 17 00:00:00 2001 From: Ronaldo Macapobre Date: Thu, 22 Aug 2024 18:10:57 +0000 Subject: [PATCH] - Fixes to use inputs rather than env - Pass node version --- .../workflows/actions/build-web/action.yml | 20 +++++++++---------- .github/workflows/app-vue.yml | 7 ++++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/actions/build-web/action.yml b/.github/workflows/actions/build-web/action.yml index 0559e5f6..aeb49908 100644 --- a/.github/workflows/actions/build-web/action.yml +++ b/.github/workflows/actions/build-web/action.yml @@ -5,31 +5,31 @@ inputs: working_directory: description: The working directory where the code will be built. required: true + node_version: + description: The node version that will be used. + required: true runs: using: composite - - strategy: - matrix: - node-version: [12.x] + steps: - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js ${{ inputs.node_version }} uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ inputs.node_version }} - run: npm ci - working-directory: ${{env.working_directory}} + working-directory: ${{ inputs.working_directory }} # Lint errors exists from SCC and will be worked on separately. - run: npm run lint - working-directory: ${{env.working_directory}} + working-directory: ${{ inputs.working_directory }} continue-on-error: true - run: npm run build - working-directory: ${{env.working_directory}} + working-directory: ${{ inputs.working_directory }} # Unit test is not configured in SCC and will be worked on separately. - run: npm run test --if-present - working-directory: ${{env.working_directory}} + working-directory: ${{ inputs.working_directory }} diff --git a/.github/workflows/app-vue.yml b/.github/workflows/app-vue.yml index 34544d35..db36c1e0 100644 --- a/.github/workflows/app-vue.yml +++ b/.github/workflows/app-vue.yml @@ -23,6 +23,10 @@ jobs: outputs: image_digest: ${{ steps.docker_push.outputs.digest }} + strategy: + matrix: + node-version: [12.x] + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -30,7 +34,8 @@ jobs: - name: Building Web codebase uses: ./.github/workflows/actions/build-web with: - working-directory: ${{ env.WORKING_DIRECTORY }} + working_directory: ${{ env.WORKING_DIRECTORY }} + node_version: ${{ matrix.node-version }} - name: Log in to the GHCR uses: docker/login-action@v3