We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e701cb9 commit 6a545b7Copy full SHA for 6a545b7
1 file changed
.github/workflows/check-api-versions.yaml
@@ -0,0 +1,25 @@
1
+name: Check API version lock
2
+
3
+on: [pull_request, workflow_dispatch]
4
5
+env:
6
+ THRESHOLD: "10 days ago"
7
8
+jobs:
9
+ main-go:
10
+ name: "[Go] Update SDK Repo"
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check commit date
14
+ run: |
15
+ if $(jq -e 'map_values(select(. != "main")) == {}' api-versions-lock.json); then
16
+ thresholdDate=$(date -Iminutes -d "${THRESHOLD}")
17
+ commitDate=$(git -P log -n 1 --format="%aI" api-versions-lock.json)
18
+ if [ ${commitDate} < ${thresholdDate} ]; then
19
+ echo "latest commit of api-versions-lock.json is older than ${THRESHOLD}"
20
+ exit 1
21
+ fi
22
+ echo "api-versions-lock.json contains locked versions but is recent is enough"
23
+ else
24
+ echo "no locked versions in api-versions-lock.json"
25
0 commit comments