Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Don't cache for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Porges committed Jul 6, 2022
1 parent 09ffa0a commit ebb508f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,18 @@ jobs:
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
- name: Get Rust version
run: 'echo "::set-output name=RUST_VERSION::$(rustc --version)"'
- name: Get Rust version & build version
run: |
echo "::set-output name=RUST_VERSION::$(rustc --version)"
VERSION=$(src/ci/get-version.sh)
# it's a release build if version doesn't have a hyphen in it
IS_RELEASE_BUILD=$(if [[ "$VERSION" =~ '-' ]]; then echo 'false'; else echo 'true'; fi)
echo "::set-output name=RELEASE_BUILD::$IS_RELEASE_BUILD"
id: rust-version
- name: Rust artifact cache
id: cache-agent-artifacts
# don't cache the rust agent for relase builds as the version number will be incorrect
if: steps.rust-version.outputs.RELEASE_BUILD == 'false'
uses: actions/cache@v3
with:
# if nothing has changed inside src/agent, we can reuse the artifacts directory
Expand Down

0 comments on commit ebb508f

Please sign in to comment.