From da239ad1ad1486c174fda46f01a1dd3045e75de6 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Thu, 11 Jul 2024 22:38:35 +0900 Subject: [PATCH] update condition Signed-off-by: Yutaka Kondo --- .github/actions/docker-build/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index ba369946981..9d8d7672bdd 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -36,7 +36,7 @@ runs: - name: Cache ccache uses: actions/cache@v4 - if: ${{ inputs.name == 'no-cuda' }} + if: ${{ inputs.name == 'no-cuda' && github.ref == 'refs/heads/main' }} id: cache-ccahce with: path: | @@ -50,7 +50,7 @@ runs: - name: Cache apt-get uses: actions/cache@v4 - if: ${{ inputs.name == 'no-cuda' }} + if: ${{ inputs.name == 'no-cuda' && github.ref == 'refs/heads/main' }} id: cache-apt-get with: path: | @@ -63,7 +63,7 @@ runs: - name: Restore ccache uses: actions/cache/restore@v4 - if: ${{ inputs.name != 'no-cuda' }} + if: ${{ inputs.name != 'no-cuda' || github.ref != 'refs/heads/main' }} with: path: | root-ccache @@ -76,7 +76,7 @@ runs: - name: Restore apt-get uses: actions/cache/restore@v4 - if: ${{ inputs.name != 'no-cuda' }} + if: ${{ inputs.name != 'no-cuda' || github.ref != 'refs/heads/main' }} with: path: | var-cache-apt