File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -179,20 +179,29 @@ jobs:
179179 coverage html
180180 coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
181181
182+ - name : Determine retention days
183+ id : determine-retention-days
184+ run : |
185+ if [ "${{ github.ref }}" = "refs/heads/main" ] || [[ "${{ github.ref }}" == refs/tags/* ]]; then
186+ echo "retention_days=90" >> $GITHUB_OUTPUT
187+ else
188+ echo "retention_days=3" >> $GITHUB_OUTPUT
189+ fi
190+
182191 - name : Upload combined .coverage file
183192 uses : actions/upload-artifact@v4
184193 with :
185194 name : coverage-file
186195 path : .coverage
187- retention-days : ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 90 || 3 }}
196+ retention-days : ${{ steps.determine-retention-days.outputs.retention_days }}
188197 include-hidden-files : true
189198
190199 - name : Upload HTML coverage report
191200 uses : actions/upload-artifact@v4
192201 with :
193202 name : coverage-html-report
194203 path : htmlcov
195- retention-days : ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 90 || 3 }}
204+ retention-days : ${{ steps.determine-retention-days.outputs.retention_days }}
196205
197206 - name : Delete temporary coverage artifacts from run
198207 uses : geekyeggo/delete-artifact@v5
You can’t perform that action at this time.
0 commit comments