We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1adabd commit 716e964Copy full SHA for 716e964
.github/workflows/go-verdiff.yaml
@@ -0,0 +1,24 @@
1
+name: go-verdiff
2
+on:
3
+ pull_request:
4
+ paths:
5
+ - go.mod
6
+ branches:
7
+ - main
8
+jobs:
9
+ go-verdiff:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ with:
14
+ fetch-depth: 0
15
+ - name: Check golang version
16
+ run: |
17
+ old=$(git grep -ohP '^go .*$' ${{ github.event.pull_request.base.sha }} -- go.mod)
18
+ new=$(git grep -ohP '^go .*$' go.mod)
19
+ if [ "${new}" != "${old}" ]; then
20
+ echo "New version of golang found: \"${new}\" vs \"${old}\""
21
+ exit 1
22
+ else
23
+ echo "No golang version change detected"
24
+ fi
0 commit comments