Skip to content

Commit 9832b4f

Browse files
committed
test workflow
Signed-off-by: Todd Short <tshort@redhat.com>
1 parent d873ec1 commit 9832b4f

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/go-verdiff.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@ jobs:
1111
with:
1212
fetch-depth: 0
1313
- name: Check golang version
14-
run: hack/tools/check-go-version.sh "${{ github.event.pull_request.base.sha }}"
14+
run: |
15+
export LABELS="$(gh api repos/$OWNER/$REPO/pulls/$PR --jq '.labels.[].name')"
16+
hack/tools/check-go-version.sh "${{ github.event.pull_request.base.sha }}"
17+
shell: bash
18+
env:
19+
GH_TOKEN: ${{ github.token }}
20+
OWNER: ${{ github.repository_owner }}
21+
REPO: ${{ github.event.repository.name }}
22+
PR: ${{ github.event.pull_request.number }}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/operator-framework/operator-controller
22

3-
go 1.23.4
3+
go 1.23.6
44

55
require (
66
github.com/BurntSushi/toml v1.5.0

hack/tools/check-go-version.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fi
1414
GO_MAJOR=${MAX_VER[0]}
1515
GO_MINOR=${MAX_VER[1]}
1616
GO_PATCH=${MAX_VER[2]}
17+
OVERRIDE_LABEL="override-go-ver"
1718

1819
RETCODE=0
1920

@@ -77,4 +78,18 @@ for f in $(find . -name "*.mod"); do
7778
fi
7879
done
7980

81+
for l in ${LABELS}; do
82+
echo "label: $l"
83+
if [ "$l" == "${OVERRIDE_LABEL}" ]; then
84+
if [ ${RETCODE} -eq 1 ]; then
85+
echo "Found ${OVERRIDE_LABEL} label, overriding failed results."
86+
RETCODE=0
87+
fi
88+
fi
89+
done
90+
91+
if [ ${RETCODE} -eq 1 ]; then
92+
echo "This test result may be overridden by applying the ${OVERRIDE_LABEL} label to this PR and re-running the CI job."
93+
fi
94+
8095
exit ${RETCODE}

0 commit comments

Comments
 (0)