@@ -594,6 +594,11 @@ jobs:
594
594
"$next" >> "$2"
595
595
next=$(egrep -i '^link: ' "$2.headers" | grep -P -i -o '(?<=<)([\S]*)(?=>; rel="next")') || [[ $? == 1 ]]
596
596
done
597
+ if [[ $RUNNER_DEBUG -eq 1 ]]; then
598
+ echo "::group::$1"
599
+ cat "$2"
600
+ echo "::endgroup::"
601
+ fi
597
602
}
598
603
599
604
stamp=$(jq -n -r 'now')
@@ -606,18 +611,9 @@ jobs:
606
611
jq -r '.[] | .number | "refs/pull/" + (. | tostring) + "/merge" | @json' pulls.json >> branch-names.json
607
612
608
613
if [[ $RUNNER_DEBUG -eq 1 ]]; then
609
- echo "::group::$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/git/matching-refs/heads"
610
- cat branches.json
611
- echo "::endgroup::"
612
- echo "::group::$GITHUB_API_URL/repos/$GITHUB_REPOSITORY//pulls?state=open"
613
- cat pulls.json
614
- echo "::endgroup::"
615
- echo "::group::$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches"
616
- cat caches.json
617
- echo "::endgroup::"
618
- echo "::group::Active Branches"
619
- cat branch-names.json
620
- echo "::endgroup::"
614
+ echo "::group::Active Branches"
615
+ cat branch-names.json
616
+ echo "::endgroup::"
621
617
fi
622
618
623
619
jq -r --slurpfile branches branch-names.json --argjson stamp "$stamp" '
@@ -688,18 +684,18 @@ jobs:
688
684
fi
689
685
690
686
jq -r -s --argjson stamp "$stamp" '
691
- { "cmake-utils": 1, "source": 1, " tools": 2, "vcpkg-registries": 1 , "vcpkg_installed": 2 } as $keep |
687
+ { "tools": 2, "vcpkg_installed": 2 } as $keep |
692
688
[
693
689
.[]
694
690
| .actions_caches
695
691
| .[]
696
692
| (. + {"$cache": .key
697
- | match("^cmu-( cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)-")
693
+ | match("^((?<= cmu-)(?: cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)|codacy-clang-tidy|opencppcoverage )-")
698
694
| .captures[0].string })
699
695
]
700
696
| group_by(."$cache")
701
697
| map(. |= ( sort_by(.last_accessed_at)
702
- | .[:-$keep[.[0]."$cache"]]
698
+ | .[:-$keep[.[0]."$cache" // 1 ]]
703
699
| map( (.created_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))
704
700
| select(.created_at <= $stamp)
705
701
| (.last_accessed_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))
0 commit comments