File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 - uses : actions/checkout@v6
99 with :
1010 fetch-depth : 0
11-
1211 - uses : actions/setup-go@v6
1312 with :
1413 go-version-file : go.mod
15-
1614 - name : Run make verify-crd-compatibility
15+ id : verify-crd-compatibility
1716 run : |
1817 make verify-crd-compatibility \
1918 CRD_DIFF_ORIGINAL_REF="git://${{ github.event.pull_request.base.sha }}?path=" \
2019 CRD_DIFF_UPDATED_REF="git://${{ github.event.pull_request.head.sha }}?path="
20+ - name : Check for override label
21+ if : ${{ failure() && steps.verify-crd-compatibility.outcome == 'failure' }}
22+ run : |
23+ if gh api repos/$OWNER/$REPO/pulls/$PR --jq '.labels.[].name' | grep -q "${OVERRIDE_LABEL}"; then
24+ echo "Found ${OVERRIDE_LABEL} label, overriding failed results."
25+ exit 0
26+ fi
27+ env :
28+ GH_TOKEN : ${{ github.token }}
29+ OWNER : ${{ github.repository_owner }}
30+ REPO : ${{ github.event.repository.name }}
31+ PR : ${{ github.event.pull_request.number }}
32+ OVERRIDE_LABEL : " crd-diff-override"
Original file line number Diff line number Diff line change @@ -11,12 +11,26 @@ jobs:
1111 with :
1212 fetch-depth : 0
1313 - name : Check golang version
14+ id : check-version
15+ continue-on-error : true
1416 run : |
15- export LABELS="$(gh api repos/$OWNER/$REPO/pulls/$PR --jq '.labels.[].name')"
1617 hack/tools/check-go-version.sh -b "${{ github.event.pull_request.base.sha }}"
1718 shell : bash
1819 env :
1920 GH_TOKEN : ${{ github.token }}
2021 OWNER : ${{ github.repository_owner }}
2122 REPO : ${{ github.event.repository.name }}
2223 PR : ${{ github.event.pull_request.number }}
24+ - name : Check for override label
25+ if : ${{ failure() && steps.check-version.outcome == 'failure' }}
26+ run : |
27+ if gh api repos/$OWNER/$REPO/pulls/$PR --jq '.labels.[].name' | grep -q "${OVERRIDE_LABEL}"; then
28+ echo "Found ${OVERRIDE_LABEL} label, overriding failed results."
29+ exit 0
30+ fi
31+ env :
32+ GH_TOKEN : ${{ github.token }}
33+ OWNER : ${{ github.repository_owner }}
34+ REPO : ${{ github.event.repository.name }}
35+ PR : ${{ github.event.pull_request.number }}
36+ OVERRIDE_LABEL : " go-verdiff-override"
Original file line number Diff line number Diff line change 4646GO_MAJOR=${MAX_VER[0]}
4747GO_MINOR=${MAX_VER[1]}
4848GO_PATCH=${MAX_VER[2]}
49- OVERRIDE_LABEL=" override-go-verdiff"
5049
5150RETCODE=0
5251
@@ -118,19 +117,4 @@ for f in $(find . -name "*.mod"); do
118117 fi
119118done
120119
121- for l in ${LABELS} ; do
122- if [ " $l " == " ${OVERRIDE_LABEL} " ]; then
123- if [ ${RETCODE} -eq 1 ]; then
124- echo " "
125- echo " Found ${OVERRIDE_LABEL} label, overriding failed results."
126- RETCODE=0
127- fi
128- fi
129- done
130-
131- if [ ${RETCODE} -eq 1 ]; then
132- echo " "
133- echo " This test result may be overridden by applying the (${OVERRIDE_LABEL} ) label to this PR and re-running the CI job."
134- fi
135-
136120exit ${RETCODE}
You can’t perform that action at this time.
0 commit comments