@@ -152,7 +152,7 @@ jobs:
152152 strategy :
153153 matrix :
154154 node-version : [20.x]
155- os-version : ["macos-12 "]
155+ os-version : ["macos-13 "]
156156 target : ["x86_64-apple-darwin", "aarch64-apple-darwin"]
157157 python-version : ["3.9", "3.10", "3.11", "3.12", "fallback"]
158158 include :
@@ -191,7 +191,7 @@ jobs:
191191 components : rustfmt
192192 target : ${{ matrix.target }}
193193 - name : Install Python
194- uses : actions/setup-python@v4
194+ uses : actions/setup-python@v5
195195 if : (matrix.python-version != 'fallback')
196196 with :
197197 python-version : ${{ matrix.python-version }}
@@ -265,7 +265,7 @@ jobs:
265265 rustflags : " "
266266 components : rustfmt
267267 - name : Install Python
268- uses : actions/setup-python@v4
268+ uses : actions/setup-python@v5
269269 if : (matrix.python-version != 'fallback')
270270 with :
271271 python-version : ${{ matrix.python-version }}
@@ -305,7 +305,7 @@ jobs:
305305 overwrite : true
306306
307307 docker-default :
308- needs : [npm, cubestore_linux, native_linux]
308+ needs : [npm, cubestore_linux, native_linux, detect_branch ]
309309 name : Debian docker image
310310 runs-on : ${{ matrix.os }}
311311 strategy :
@@ -345,7 +345,11 @@ jobs:
345345 if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
346346 MINOR=${VERSION%.*}
347347 MAJOR=${MINOR%.*}
348- TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:latest"
348+ TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR}"
349+ fi
350+
351+ if [ "${{ needs['detect_branch'].outputs.is_master }}" = "true" ]; then
352+ TAGS="$TAGS,${DOCKER_IMAGE}:latest"
349353 fi
350354
351355 {
@@ -385,7 +389,7 @@ jobs:
385389 IMAGE_VERSION=${{ steps.prep.outputs.version }}
386390
387391 docker-debian-jdk :
388- needs : [npm, cubestore_linux, native_linux]
392+ needs : [npm, cubestore_linux, native_linux, detect_branch ]
389393 name : Debian with jdk docker image
390394 runs-on : ubuntu-24.04
391395 timeout-minutes : 30
@@ -420,11 +424,15 @@ jobs:
420424 if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
421425 MINOR=${VERSION%.*}
422426 MAJOR=${MINOR%.*}
423- TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}-jdk,${DOCKER_IMAGE}:${MAJOR}-jdk,${DOCKER_IMAGE}:jdk "
427+ TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}-jdk,${DOCKER_IMAGE}:${MAJOR}-jdk"
424428 elif [ "${{ github.event_name }}" = "push" ]; then
425429 TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}-jdk"
426430 fi
427431
432+ if [ "${{ needs['detect_branch'].outputs.is_master }}" = "true" ]; then
433+ TAGS="$TAGS,${DOCKER_IMAGE}:jdk"
434+ fi
435+
428436 {
429437 echo "version=${VERSION}"
430438 echo "tags=${TAGS}"
@@ -464,6 +472,7 @@ jobs:
464472 docker-cubestore :
465473 name : Cube Store Docker
466474 runs-on : ${{ matrix.os }}
475+ needs : [detect_branch]
467476 strategy :
468477 fail-fast : false
469478 matrix :
@@ -521,7 +530,11 @@ jobs:
521530 if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
522531 MINOR=${VERSION%.*}
523532 MAJOR=${MINOR%.*}
524- TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${MAJOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${{ matrix.tag }}"
533+ TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${MAJOR}${{ matrix.postfix }}"
534+ fi
535+
536+ if [ "${{ needs['detect_branch'].outputs.is_master }}" = "true" ]; then
537+ TAGS="$TAGS,${DOCKER_IMAGE}:${{ matrix.tag }}"
525538 fi
526539
527540 {
@@ -653,17 +666,26 @@ jobs:
653666 target :
654667 - x86_64-pc-windows-msvc
655668 - x86_64-apple-darwin
669+ - aarch64-apple-darwin
656670 include :
657671 - target : x86_64-pc-windows-msvc
658672 os : windows-2019
659673 executable_name : cubestored.exe
660674 strip : true
661675 # cubestored.exe: CantPackException: superfluous data between sections
662676 compress : false
663- # Please use minimal possible version of macOS, because it produces constraint on libstdc++
664677 tar_executable : tar
678+ # Please use minimal possible version of macOS, because it produces constraint on libstdc++
665679 - target : x86_64-apple-darwin
666- os : macos-12
680+ os : macos-13
681+ executable_name : cubestored
682+ # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
683+ strip : false
684+ compress : false
685+ # bsd tar has a different format with Sparse files which breaks download script
686+ tar_executable : gtar
687+ - os : macos-14
688+ target : aarch64-apple-darwin
667689 executable_name : cubestored
668690 # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
669691 strip : false
@@ -744,7 +766,7 @@ jobs:
744766 name : Trigger test suites run
745767 runs-on : ubuntu-20.04
746768 needs : [docker-default]
747- timeout-minutes : 60
769+ timeout-minutes : 15
748770 steps :
749771 - name : Checkout
750772 uses : actions/checkout@v4
@@ -769,3 +791,45 @@ jobs:
769791 'initiator': '${{ github.actor }}'
770792 }
771793 })
794+
795+ detect_branch :
796+ runs-on : ubuntu-24.04
797+ outputs :
798+ is_master : ${{ steps.detect_branch.outputs.is_master }}
799+ branch : ${{ steps.detect_branch.outputs.branch }}
800+ steps :
801+ - name : Checkout
802+ uses : actions/checkout@v4
803+ - name : Detect branch name
804+ id : detect_branch
805+ run : |
806+ # Git & GitHub (for now) doesn't provide an easy/stable way to detect branch name from tag.
807+ echo "branch=master" >> "$GITHUB_OUTPUT"
808+ echo "is_master=true" >> "$GITHUB_OUTPUT"
809+
810+ trigger-repo-sync :
811+ name : Trigger runtime repo
812+ runs-on : ubuntu-20.04
813+ needs : [docker-default, detect_branch]
814+ timeout-minutes : 15
815+ steps :
816+ - name : Checkout
817+ uses : actions/checkout@v4
818+ - name : Trigger runtime
819+ uses : actions/github-script@v7
820+ with :
821+ github-token : ${{ secrets.GH_TRIGGER_TOKEN }}
822+ script : |
823+ const tagName = process.env.GITHUB_REF.replace('refs/tags/', '');
824+ const branchName = '${{ needs['detect_branch'].outputs.branch }}';
825+
826+ await github.rest.actions.createWorkflowDispatch({
827+ owner: 'cubedevinc',
828+ repo: 'cube-runtime',
829+ workflow_id: 'sync.yml',
830+ ref: 'master',
831+ inputs: {
832+ 'tag': tagName,
833+ 'branch': branchName,
834+ }
835+ })
0 commit comments