Skip to content

Commit

Permalink
Use cache only for main and latest two release branches. (#12492)
Browse files Browse the repository at this point in the history
Cache is branch-specific.

For pull-requests based on some feature-branch we can skip cache and
save available space on our workflow cache as well as time required to
run workflow.
  • Loading branch information
lystopad authored Oct 25, 2024
1 parent cf4ace8 commit c13dbaa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test-integration-caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
"refs/heads/main"
]'), github.ref) }}

- name: Install dependencies on Linux
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install build-essential
Expand All @@ -45,6 +51,11 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: ${{ contains(fromJSON('[
"refs/heads/release/2.60",
"refs/heads/release/2.61",
"refs/heads/main"
]'), github.ref) }}

- uses: actions/cache@v4
with:
Expand Down

0 comments on commit c13dbaa

Please sign in to comment.