Skip to content

Commit ace1712

Browse files
authored
Merge pull request #247 from cisagov/improvement/fix_cache_key_formatting
Adjust the `lint` job of the `build` workflow's cache key formatting
2 parents fe7eb42 + 77f204a commit ace1712

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
@@ -122,16 +122,18 @@ jobs:
122122
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
123123
- uses: actions/cache@v5
124124
env:
125-
BASE_CACHE_KEY: ${{ github.job }}-${{ runner.os }}-\
126-
py${{ steps.setup-python.outputs.python-version }}-\
127-
go${{ steps.setup-go.outputs.go-version }}-\
128-
packer${{ steps.setup-env.outputs.packer-version }}-\
129-
tf${{ steps.setup-env.outputs.terraform-version }}-
125+
BASE_CACHE_KEY: >-
126+
${{ github.job }}-${{ runner.os
127+
}}-py${{ steps.setup-python.outputs.python-version
128+
}}-go${{ steps.setup-go.outputs.go-version
129+
}}-packer${{ steps.setup-env.outputs.packer-version
130+
}}-tf${{ steps.setup-env.outputs.terraform-version }}-
130131
with:
131-
key: ${{ env.BASE_CACHE_KEY }}\
132-
${{ hashFiles('**/requirements-test.txt') }}-\
133-
${{ hashFiles('**/requirements.txt') }}-\
134-
${{ hashFiles('**/.pre-commit-config.yaml') }}
132+
key: >-
133+
${{ env.BASE_CACHE_KEY }}${{
134+
hashFiles('**/requirements-test.txt') }}-${{
135+
hashFiles('**/requirements.txt') }}-${{
136+
hashFiles('**/.pre-commit-config.yaml') }}
135137
# Note that the .terraform directory IS NOT included in the
136138
# cache because if we were caching, then we would need to use
137139
# the `-upgrade=true` option. This option blindly pulls down the

0 commit comments

Comments
 (0)