File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,29 @@ concurrency:
15
15
cancel-in-progress : ${{ github.event_name == 'pull_request' }}
16
16
17
17
jobs :
18
+ checkout-version-check :
19
+ name : checkout & version check
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - name : Checkout repository
23
+ uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
24
+ with :
25
+ fetch-depth : 0
26
+
27
+ - name : Version check
28
+ run : |
29
+ GIT_VERSION=${GITHUB_REF%-*}
30
+ PYTHON_VERSION=$(grep -m 1 version pyproject.toml | grep -e '\d.\d.\d' -o)
31
+ if [[ "$GIT_VERSION" == "$PYTHON_VERSION" ]]; then
32
+ printf "PYTHON_VERSION: %s and GIT_VERSION: %s are matched" "$PYTHON_VERSION" "$GIT_VERSION"
33
+ printf "Version check passed"
34
+ else
35
+ printf "Version check failed, version in pyproject.toml: %s and git tag version: %s are mismatched" "$PYTHON_VERSION" "$GIT_VERSION"
36
+ exit 1
37
+ fi
18
38
build-push :
19
39
name : Build docker image - wfsrv
40
+ needs : [checkout-version-check]
20
41
uses : ./.github/workflows/reusable-docker-build-push.yaml
21
42
permissions :
22
43
contents : " read"
You can’t perform that action at this time.
0 commit comments