From 8fecd938f1943a497cf92f349a65a2f4360e3bb6 Mon Sep 17 00:00:00 2001 From: Mahesh-wor 'Invoron <72002075+mahesh-naxa@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:04:02 +0545 Subject: [PATCH] actions: fix github.workspace & actions/checkout conflicting path $ {{ github.workspace }} returns /home/runner/work/OSMSG/OSMSG but actions/checkout is used to checkout code to a relative "frontend" named directory. This is causing IF statement to fail always. --- .github/workflows/nextjs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index c1e50ed5..648eebb6 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -39,12 +39,12 @@ jobs: - name: Detect package manager id: detect-package-manager run: | - if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then + if [ -f "${{ github.workspace }}/frontend/frontend/yarn.lock" ]; then echo "manager=yarn" >> $GITHUB_OUTPUT echo "command=install" >> $GITHUB_OUTPUT echo "runner=yarn" >> $GITHUB_OUTPUT exit 0 - elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then + elif [ -f "${{ github.workspace }}/frontend/frontend/package.json" ]; then echo "manager=npm" >> $GITHUB_OUTPUT echo "command=ci" >> $GITHUB_OUTPUT echo "runner=npx --no-install" >> $GITHUB_OUTPUT