adoroszlai commented on code in PR #12140:
URL: https://github.com/apache/ozone/pull/12140#discussion_r4679423848
##########
.github/workflows/populate-cache.yml:
##########
@@ -62,6 +62,32 @@ jobs:
with:
only-exact-hit: true
+ - name: Restore NPM dependencies
+ id: restore-pnpm
+ uses: actions/cache/restore@v6
+ with:
+ path: |
+ ~/.pnpm-store
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
+
+ - name: Fetch NPM dependencies
+ if: steps.restore-pnpm.outputs.cache-hit != 'true'
+ run: |
+ ./mvnw -pl :ozone-recon
com.github.eirslett:frontend-maven-plugin:install-node-and-pnpm
+ run_pnpm() {
+ ./mvnw -pl :ozone-recon
com.github.eirslett:frontend-maven-plugin:pnpm -Dfrontend.pnpm.arguments="$1"
+ }
+ run_pnpm "config set store-dir ~/.pnpm-store"
+ run_pnpm fetch
+
+ - name: Save NPM dependencies
+ if: steps.restore-pnpm.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v6
+ with:
+ path: |
+ ~/.pnpm-store
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
Review Comment:
Addressed in 36a83be5c8d6c06dfdd9f23ae682656d9b46964f.
(Turns out `actions/cache/restore` has an
[output](https://github.com/actions/cache/blob/main/restore/README.md#outputs)
for this (`cache-primary-key`), but using a separate step to allow switch to
`stash`, if needed.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]