File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 66 - v* # Push events to matching v*, i.e. v1.0, v20.15.10
77
88jobs :
9+ # Check if the tag mayor/minor is in the metadata.yaml file
10+ check-tag :
11+ name : Check tag
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Download yq
15+ uses : supplypike/setup-bin@v4
16+ with :
17+ name : yq
18+ version : v4.30.6
19+ uri : https://github.com/mikefarah/yq/releases/download/v4.30.6/yq_linux_amd64
20+
21+ - name : Check that metadata.yaml includes tag version
22+ id : get_major_minor
23+ run : |
24+ TAG="${GITHUB_REF#refs/tags/}"
25+ TAG="${TAG#v}"
26+ IFS='.' read -r major minor patch <<< "$TAG"
27+ major_minor="$major.$minor"
28+
29+ all_versions=$(yq -r '.releaseSeries[] | "\(.major).\(.minor)"' metadata.yaml)
30+
31+ if ! echo "$all_versions" | grep -q "^$major_minor$"; then
32+ echo "metadata.yaml does not include version '$major_minor'"
33+ echo "Found versions:"
34+ echo "$all_versions"
35+ exit 1
36+ fi
937 release :
1038 name : release
1139 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments