diff --git a/.github/actions/install-frontend-dependencies/action.yml b/.github/actions/install-frontend-dependencies/action.yml index a979ef43..12904632 100644 --- a/.github/actions/install-frontend-dependencies/action.yml +++ b/.github/actions/install-frontend-dependencies/action.yml @@ -8,19 +8,31 @@ inputs: runs: using: "composite" steps: + - name: Determine grafana-plugin directory location + id: grafana-plugin-directory + shell: bash + run: echo "grafana-plugin-directory=${{ inputs.working-directory }}/grafana-plugin" >> $GITHUB_OUTPUT + - name: Determine yarn.lock location + id: yarn-lock-location + shell: bash + # yamllint disable rule:line-length + run: echo "yarn-lock-location=${{ steps.grafana-plugin-directory.outputs.grafana-plugin-directory }}/yarn.lock" >> $GITHUB_OUTPUT + # yamllint enable rule:line-length - uses: actions/setup-node@v3 with: node-version: 18.16.0 cache: "yarn" - cache-dependency-path: ${{ inputs.working-directory }}/grafana-plugin/yarn.lock + cache-dependency-path: ${{ steps.yarn-lock-location.outputs.yarn-lock-location }} - name: Use cached frontend dependencies id: cache-frontend-dependencies uses: actions/cache@v3 with: path: ${{ inputs.working-directory }}/grafana-plugin/node_modules - key: ${{ runner.os }}-frontend-node-modules-${{ hashFiles('grafana-plugin/yarn.lock') }} + # yamllint disable rule:line-length + key: ${{ runner.os }}-frontend-node-modules-${{ hashFiles(steps.yarn-lock-location.outputs.yarn-lock-location) }} + # yamllint enable rule:line-length - name: Install frontend dependencies if: steps.cache-frontend-dependencies.outputs.cache-hit != 'true' shell: bash - working-directory: ${{ inputs.working-directory }}/grafana-plugin + working-directory: ${{ steps.grafana-plugin-directory.outputs.grafana-plugin-directory }} run: yarn install --frozen-lockfile --prefer-offline --network-timeout 500000