update install-frontend-dependencies composable github action (again) (#4404)
This commit is contained in:
parent
f7beced64e
commit
2881bc8fec
1 changed files with 15 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue