File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,22 @@ jobs:
129
129
steps :
130
130
- uses : actions/checkout@v4
131
131
132
+ - name : Generate code hash
133
+ id : hash
134
+ run : |
135
+ # Create hash of all source and test files
136
+ find src -type f \( -name "*.cs" -o -name "*.csproj" -o -name "*.json" -o -name "*.xml" \) -print0 | sort -z | xargs -0 sha256sum | sha256sum | cut -d' ' -f1 > code_hash.txt
137
+ echo "code_hash=$(cat code_hash.txt)" >> $GITHUB_OUTPUT
138
+
139
+ - name : Check code hash cache
140
+ id : cache-hash
141
+ uses : actions/cache@v4
142
+ with :
143
+ path : code_hash.txt
144
+ key : ${{ runner.os }}-code-${{ steps.hash.outputs.code_hash }}
145
+
132
146
- name : Set up Docker Buildx
147
+ if : steps.cache-hash.outputs.cache-hit != 'true'
133
148
uses : docker/setup-buildx-action@v2
134
149
135
150
- name : Run Tests
You can’t perform that action at this time.
0 commit comments