From 51f23517b81947bbdae365a65516a820417c27c6 Mon Sep 17 00:00:00 2001 From: hugoalh Date: Sun, 15 Dec 2024 10:52:35 +0800 Subject: [PATCH] Update workflow --- .github/workflows/publish-deno-package.yml | 28 ++++++++-------------- .github/workflows/review-deno-code.yml | 14 ++++------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/.github/workflows/publish-deno-package.yml b/.github/workflows/publish-deno-package.yml index bfa6d12..9d9a6d3 100644 --- a/.github/workflows/publish-deno-package.yml +++ b/.github/workflows/publish-deno-package.yml @@ -28,15 +28,11 @@ jobs: id: "deno-cache-restore" uses: "actions/cache/restore@v4" with: - key: "Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" + key: "${{runner.os}}/Deno/${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" restore-keys: |- - Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}- - Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}} - Deno/${{runner.os}}-${{github.run_id}}- - Deno/${{runner.os}}-${{github.run_id}} - Deno/${{runner.os}}- - Deno/${{runner.os}} - Deno/ + ${{runner.os}}/Deno/${{github.run_id}}-${{github.run_attempt}}- + ${{runner.os}}/Deno/${{github.run_id}}- + ${{runner.os}}/Deno/ path: "${{steps.deno-cache-path.outputs.value}}" - name: "Resolve Metadata" id: "metadata" @@ -81,7 +77,7 @@ jobs: if: "${{!cancelled() && steps.deno-cache-restore.outcome == 'success'}}" uses: "actions/cache/save@v4" with: - key: "Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" + key: "${{runner.os}}/Deno/${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" path: "${{steps.deno-cache-path.outputs.value}}" outputs: npm-artifact: "${{steps.npm-artifact.outcome == 'success'}}" @@ -122,15 +118,11 @@ jobs: id: "npm-cache-restore" uses: "actions/cache/restore@v4" with: - key: "NPM/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" + key: "${{runner.os}}/NPM/${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" restore-keys: |- - NPM/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}- - NPM/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}} - NPM/${{runner.os}}-${{github.run_id}}- - NPM/${{runner.os}}-${{github.run_id}} - NPM/${{runner.os}}- - NPM/${{runner.os}} - NPM/ + ${{runner.os}}/NPM/${{github.run_id}}-${{github.run_attempt}}- + ${{runner.os}}/NPM/${{github.run_id}}- + ${{runner.os}}/NPM/ path: "${{steps.npm-cache-path.outputs.value}}" - name: "Resolve Metadata" id: "metadata" @@ -230,5 +222,5 @@ jobs: if: "${{!cancelled() && steps.npm-cache-restore.outcome == 'success'}}" uses: "actions/cache/save@v4" with: - key: "NPM/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" + key: "${{runner.os}}/NPM/${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" path: "${{steps.npm-cache-path.outputs.value}}" diff --git a/.github/workflows/review-deno-code.yml b/.github/workflows/review-deno-code.yml index 47268cc..2002493 100644 --- a/.github/workflows/review-deno-code.yml +++ b/.github/workflows/review-deno-code.yml @@ -46,15 +46,11 @@ jobs: id: "deno-cache-restore" uses: "actions/cache/restore@v4" with: - key: "Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" + key: "${{runner.os}}/Deno/${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" restore-keys: |- - Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}- - Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}} - Deno/${{runner.os}}-${{github.run_id}}- - Deno/${{runner.os}}-${{github.run_id}} - Deno/${{runner.os}}- - Deno/${{runner.os}} - Deno/ + ${{runner.os}}/Deno/${{github.run_id}}-${{github.run_attempt}}- + ${{runner.os}}/Deno/${{github.run_id}}- + ${{runner.os}}/Deno/ path: "${{steps.deno-cache-path.outputs.value}}" - name: "Analyze Repository" id: "analyze" @@ -128,5 +124,5 @@ jobs: if: "${{!cancelled() && steps.deno-cache-restore.outcome == 'success'}}" uses: "actions/cache/save@v4" with: - key: "Deno/${{runner.os}}-${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" + key: "${{runner.os}}/Deno/${{github.run_id}}-${{github.run_attempt}}-${{github.job}}" path: "${{steps.deno-cache-path.outputs.value}}"