Skip to content

Commit

Permalink
Update ci cache policy
Browse files Browse the repository at this point in the history
  • Loading branch information
awnion committed Sep 21, 2023
1 parent a5d31aa commit 22f0a69
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ on:
push:
branches:
- main
- dev
- 'ci/**'
tags:
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
paths:
- '.github/workflows/prerelease.yaml'
- 'git-remote-gosh/**'
- 'v1_x/**'
- 'v2_x/**'
- 'v3_x/**'
- 'v4_x/**'
- 'v5_x/**'
- 'v6_x/**'

permissions:
contents: write
Expand Down Expand Up @@ -91,6 +101,8 @@ jobs:
- bin: git-remote-gosh_v6_1_0
dir: v6_x/v6.1.0/git-remote-gosh

name: B ${{ matrix.bin }} ${{ matrix.target }}

env:
CACHE: false # default env value
CACHE_RESULT_DIR: ${{ github.workspace }}/.result/${{ matrix.result }}
Expand All @@ -108,11 +120,10 @@ jobs:
- name: Setup result cache
uses: actions/cache@v3
with:
# IMPORTANT: path here should be relative to the workspace directory
path: |
.result
${{ matrix.dir }}/target
key: builder-${{ runner.os }}-result-${{ matrix.bin }}
key: builder-${{ matrix.target }}-result-${{ matrix.bin }}

- name: Check if can use cache
if: matrix.cache
Expand Down

0 comments on commit 22f0a69

Please sign in to comment.