@@ -29,21 +29,20 @@ jobs:
2929 WORKDIR : utils/docker
3030 strategy :
3131 matrix :
32- CONFIG : ["TYPE=debug OS=fedora OS_VER=32 PUSH_IMAGE=1",
33- " TYPE=debug OS=fedora OS_VER=34 PUSH_IMAGE=1" ,
32+ CONFIG : ["TYPE=debug OS=fedora OS_VER=34 PUSH_IMAGE=1",
3433 " TYPE=debug OS=ubuntu OS_VER=20.04 PUSH_IMAGE=1 CHECK_CPP_STYLE=1" ,
3534 " TYPE=debug OS=ubuntu OS_VER=20.04 COVERAGE=1" ,
36- " TYPE=release OS=fedora OS_VER=32 " ,
35+ " TYPE=release OS=fedora OS_VER=34 " ,
3736 " TYPE=release OS=ubuntu OS_VER=20.04" ,
38- " TYPE=valgrind OS=ubuntu OS_VER=20.04" ,
39- " TYPE=memcheck_drd OS=ubuntu OS_VER=20.04" ,
40- " TYPE=package OS=fedora OS_VER=32 " ,
37+ " TYPE=valgrind OS=ubuntu OS_VER=20.04 TESTS_VALGRIND_UNWIND=0 " ,
38+ " TYPE=memcheck_drd OS=ubuntu OS_VER=20.04 TESTS_VALGRIND_UNWIND=0 " ,
39+ " TYPE=package OS=fedora OS_VER=34 " ,
4140 " TYPE=package OS=ubuntu OS_VER=20.04" ]
4241 steps :
4342 - name : Get release version
4443 if : github.event_name == 'release'
4544 id : get_release_version
46- run : echo ::set-output name=VERSION::$(echo ${{ github.event.release.tag_name }} | grep -E " ^[0-9]+.[0-9]+(-rc[0-9]+)?$" | cut -f 1,2 -d . | cut -f 1 -d - )
45+ run : echo ::set-output name=VERSION::$(echo ${{ github.event.release.tag_name }} | awk -F '[.-]' '/ ^[0-9]+.[0-9]+[.0-9]* (-rc[0-9]+)?$/ {print $1 "." $2}' )
4746
4847 - name : Set image version and force image action for release
4948 if : github.event_name == 'release' && steps.get_release_version.outputs.VERSION != ''
5251 echo "FORCE_IMAGE_ACTION=rebuild" >> $GITHUB_ENV
5352
5453 - name : Set image version and force image action for stable branch
55- if : startsWith(github.ref, 'refs/heads/stable-')
54+ # we want to set IMG_VER to e.g. '1.x' for stable branches and PRs against them
55+ # for PRs we have to use 'base_ref' - this is the target branch (and we have to check that instead)
56+ if :
57+ startsWith(github.ref, 'refs/heads/stable-') || startsWith(github.base_ref, 'stable-')
58+ # we now know we're on (or against) stable branches, so we just need to pick the version (e.g. the mentioned '1.x')
5659 run : |
57- echo "IMG_VER=$(echo ${GITHUB_REF#refs/heads/} | cut -d - -f 2)" >> $GITHUB_ENV
60+ IMG_VER=$(echo ${GITHUB_BASE_REF} | cut -d - -f 2)
61+ [ -z "${IMG_VER}" ] \
62+ && echo "IMG_VER=$(echo ${GITHUB_REF#refs/heads/} | cut -d - -f 2)" >> $GITHUB_ENV \
63+ || echo "IMG_VER=${IMG_VER}" >> $GITHUB_ENV
5864 echo "FORCE_IMAGE_ACTION=rebuild" >> $GITHUB_ENV
5965
6066 - name : Clone the git repo
6874
6975 - name : Run the build
7076 run : cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
77+
7178 doc :
7279 name : build and publish docs
7380 runs-on : ubuntu-latest
8390 matrix :
8491 CONFIG : ["TYPE=doc OS=fedora OS_VER=34"]
8592 steps :
93+ - name : Set image version for stable branch
94+ # doc update happens only on stable branch (not on PR), so we check only for heads ref
95+ if : startsWith(github.ref, 'refs/heads/stable-')
96+ run : |
97+ echo "IMG_VER=$(echo ${GITHUB_REF#refs/heads/} | cut -d - -f 2)" >> $GITHUB_ENV
98+
8699 - name : Clone the git repo
87100 uses : actions/checkout@v2
88101 with :
0 commit comments