Skip to content

Commit 77f204a

Browse files
committed
Adjust the build workflow's cache key formatting
This will return the cache key to being a string with no new lines.
1 parent aacda2e commit 77f204a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,18 @@ jobs:
120120
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
121121
- uses: actions/cache@v4
122122
env:
123-
BASE_CACHE_KEY: ${{ github.job }}-${{ runner.os }}-\
124-
py${{ steps.setup-python.outputs.python-version }}-\
125-
go${{ steps.setup-go.outputs.go-version }}-\
126-
packer${{ steps.setup-env.outputs.packer-version }}-\
127-
tf${{ steps.setup-env.outputs.terraform-version }}-
123+
BASE_CACHE_KEY: >-
124+
${{ github.job }}-${{ runner.os
125+
}}-py${{ steps.setup-python.outputs.python-version
126+
}}-go${{ steps.setup-go.outputs.go-version
127+
}}-packer${{ steps.setup-env.outputs.packer-version
128+
}}-tf${{ steps.setup-env.outputs.terraform-version }}-
128129
with:
129-
key: ${{ env.BASE_CACHE_KEY }}\
130-
${{ hashFiles('**/requirements-test.txt') }}-\
131-
${{ hashFiles('**/requirements.txt') }}-\
132-
${{ hashFiles('**/.pre-commit-config.yaml') }}
130+
key: >-
131+
${{ env.BASE_CACHE_KEY }}${{
132+
hashFiles('**/requirements-test.txt') }}-${{
133+
hashFiles('**/requirements.txt') }}-${{
134+
hashFiles('**/.pre-commit-config.yaml') }}
133135
# Note that the .terraform directory IS NOT included in the
134136
# cache because if we were caching, then we would need to use
135137
# the `-upgrade=true` option. This option blindly pulls down the

0 commit comments

Comments
 (0)