From ed71c91c9a45f775b60471849d14dca35de1b9a8 Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Wed, 27 Mar 2024 17:00:51 -0400 Subject: [PATCH 01/10] added working directory for Yaml validation job --- .github/workflows/php-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index c40a95c..9830e75 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -530,7 +530,7 @@ jobs: working-directory: ${{ inputs.working-directory }} - name: Yaml validation - run: php ./internals/scripts/YamlLint.php + run: php ${{ inputs.working-directory }}/internals/scripts/YamlLint.php build_backend: name: Build backend From d02bdade99ece895a0c9e27e081a4c8ef44b6957 Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 08:03:15 -0400 Subject: [PATCH 02/10] fix --- .github/workflows/php-app.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index 9830e75..94e120b 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -530,7 +530,8 @@ jobs: working-directory: ${{ inputs.working-directory }} - name: Yaml validation - run: php ${{ inputs.working-directory }}/internals/scripts/YamlLint.php + working-directory: ${{ inputs.working-directory }} + run: php ./internals/scripts/YamlLint.php build_backend: name: Build backend From 43b7c8084eeda5e652f2fd6c81bc6aa1a7ad18b3 Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 08:21:43 -0400 Subject: [PATCH 03/10] package version working directory --- .github/workflows/php-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index 94e120b..0e1f5a5 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -558,6 +558,7 @@ jobs: - name: Update package version env: VERSION: ${{ needs.setup.outputs.version }} + working-directory: ${{ inputs.working-directory }} run: | # Composer versions must match ^v?\d+(\.\d+){0,3}|^dev- if [[ $VERSION =~ ^v?[0-9]+(\.[0-9]+){0,3}$ ]]; then From 17020a3e69ca3a9ca837ac154150dd23c74bc846 Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 08:36:14 -0400 Subject: [PATCH 04/10] working directory --- .github/workflows/php-app.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index 0e1f5a5..fdc1e71 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -594,10 +594,12 @@ jobs: ./script/tool API UpdateWsdl -v - name: Tar build output + working-directory: ${{ inputs.working-directory }} run: tar -cvf backend-build-output.tar $(ls -d composer.json vendor/ apps/**/wsdl/*.xml 2>/dev/null) - name: Store build artifact uses: actions/upload-artifact@v4 + working-directory: ${{ inputs.working-directory }} with: name: backend-build-output path: backend-build-output.tar From 666069cad32a0520444f3ae873e74a07ca755a1d Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 08:48:34 -0400 Subject: [PATCH 05/10] wd --- .github/workflows/php-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index fdc1e71..e219b45 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -599,12 +599,12 @@ jobs: - name: Store build artifact uses: actions/upload-artifact@v4 - working-directory: ${{ inputs.working-directory }} with: name: backend-build-output path: backend-build-output.tar retention-days: 1 if-no-files-found: error + working-directory: ${{ inputs.working-directory }} build_frontend: name: Build frontend From bd2a175c5ac3358a3378682d9e3e91a93f6bfd5a Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 08:56:26 -0400 Subject: [PATCH 06/10] store artifact working directory --- .github/workflows/php-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index e219b45..cc88eff 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -601,10 +601,10 @@ jobs: uses: actions/upload-artifact@v4 with: name: backend-build-output - path: backend-build-output.tar + path: ${{ inputs.working-directory }}/backend-build-output.tar retention-days: 1 if-no-files-found: error - working-directory: ${{ inputs.working-directory }} + build_frontend: name: Build frontend From 4ea2571efeba0f00fbd507a09c77f5f7ec099b9b Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 09:01:02 -0400 Subject: [PATCH 07/10] remove space --- .github/workflows/php-app.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index cc88eff..f37dd6a 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -605,7 +605,6 @@ jobs: retention-days: 1 if-no-files-found: error - build_frontend: name: Build frontend needs: From 91c0e622bca3741f0dd6f31ae3542067b60cc5d8 Mon Sep 17 00:00:00 2001 From: Alex Elie Date: Thu, 28 Mar 2024 09:53:00 -0400 Subject: [PATCH 08/10] working directory for frontend --- .github/workflows/php-app.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index f37dd6a..f8ea51a 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -623,6 +623,7 @@ jobs: - name: Update package version env: VERSION: ${{ needs.setup.outputs.version }} + working-directory: ${{ inputs.working-directory }} run: | contents="$(jq ".version = \"${VERSION}\"" ./package.json)" && echo "${contents}" > ./package.json @@ -634,9 +635,11 @@ jobs: - name: Install NPM dependencies uses: equisoft-actions/yarn-install@v1 + with: + working-directory: ${{ inputs.working-directory }} - name: Webpack - working-directory: . + working-directory: ${{ inputs.working-directory }} run: | SKIP_COMPRESSION=true if [[ "${{ needs.setup.outputs.publishable }}" == "true" ]]; then @@ -645,13 +648,14 @@ jobs: NO_COMPRESS=${SKIP_COMPRESSION} yarn build:production - name: Tar build output + working-directory: ${{ inputs.working-directory }} run: tar -cvf frontend-build-output.tar $(ls -d package.json ${{ inputs.frontend-build-path }} 2>/dev/null) - name: Store build artifact uses: actions/upload-artifact@v4 with: name: frontend-build-output - path: frontend-build-output.tar + path: ${{ inputs.working-directory }}/frontend-build-output.tar retention-days: 1 if-no-files-found: error From 02a903bc5f3c05c64770cbeeb6b14df634a20d3b Mon Sep 17 00:00:00 2001 From: Eric Durand-Tremblay Date: Thu, 28 Mar 2024 10:05:11 -0400 Subject: [PATCH 09/10] Test image build and fix more working-direcotry --- .github/workflows/php-app.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index f8ea51a..311f3d2 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -578,6 +578,7 @@ jobs: - name: Site Config if: inputs.site-config-path != '' shell: bash + working-directory: ${{ inputs.working-directory }} run: | sudo mkdir -p $(dirname ${{ inputs.site-config-path }}) sudo cat < /tmp/configs.yml @@ -590,6 +591,7 @@ jobs: - name: Generate WSDL Files if: inputs.update-wsdl shell: bash + working-directory: ${{ inputs.working-directory }} run: | ./script/tool API UpdateWsdl -v @@ -680,7 +682,6 @@ jobs: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && - needs.setup.outputs.publishable == 'true' && !failure() && !cancelled() @@ -694,9 +695,10 @@ jobs: uses: actions/download-artifact@v4 with: name: backend-build-output - path: . + path: ${{ inputs.working-directory }} - name: Un-tar backend build output + working-directory: ${{ inputs.working-directory }} run: tar -xvf backend-build-output.tar - name: Download frontend build output @@ -704,10 +706,11 @@ jobs: uses: actions/download-artifact@v4 with: name: frontend-build-output - path: . + path: ${{ inputs.working-directory }} - name: Un-tar frontend build output if: inputs.frontend + working-directory: ${{ inputs.working-directory }} run: tar -xvf frontend-build-output.tar - name: Determine platforms to build From 32b6e5ecc7a0d1604af600569e107c4362e3d14e Mon Sep 17 00:00:00 2001 From: Eric Durand-Tremblay Date: Thu, 28 Mar 2024 14:31:30 -0400 Subject: [PATCH 10/10] re-disable image build when no publish --- .github/workflows/php-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/php-app.yml b/.github/workflows/php-app.yml index 311f3d2..136d51e 100644 --- a/.github/workflows/php-app.yml +++ b/.github/workflows/php-app.yml @@ -682,6 +682,7 @@ jobs: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && + needs.setup.outputs.publishable == 'true' && !failure() && !cancelled()