1+ name : Docker Extension for Kanvas
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ branches :
8+ - " master"
9+ paths-ignore :
10+ - " docs/**"
11+ # - '.github/**'
12+
13+ workflow_dispatch :
14+ inputs :
15+ release-ver :
16+ description : " Stable Release Version"
17+ required : true
18+ default : " v"
19+ stripped-release-ver :
20+ description : " Stripped Stable Release Version"
21+ required : true
22+ default : " "
23+ release-channel :
24+ description : " Release Channel"
25+ required : true
26+ default : " edge"
27+
28+ env :
29+ GIT_VERSION : ${{github.event.inputs.release-ver}}
30+ GIT_STRIPPED_VERSION : ${{github.event.inputs.stripped-release-ver}}
31+ RELEASE_CHANNEL : ${{github.event.inputs.release-channel}}
32+
33+ jobs :
34+ derive-version-info :
35+ runs-on : ubuntu-24.04
36+ outputs :
37+ GIT_VERSION : ${{ steps.set-vars.outputs.GIT_VERSION }}
38+ GIT_STRIPPED_VERSION : ${{ steps.set-vars.outputs.GIT_STRIPPED_VERSION }}
39+ RELEASE_CHANNEL : ${{ steps.set-vars.outputs.RELEASE_CHANNEL }}
40+ steps :
41+ - name : Set version variables from tag
42+ id : set-vars
43+ run : |
44+ TAG_NAME="${{ github.event.release.tag_name }}"
45+ echo "Detected tag: $TAG_NAME"
46+
47+ # Strip 'v' from version tag if it exists
48+ STRIPPED_VERSION="${TAG_NAME#v}"
49+
50+ # Use 'stable' if it's a tagged release, else fallback to 'edge'
51+ if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
52+ CHANNEL="stable"
53+ else
54+ CHANNEL="edge"
55+ fi
56+
57+ echo "GIT_VERSION=$TAG_NAME" >> $GITHUB_OUTPUT
58+ echo "GIT_STRIPPED_VERSION=$STRIPPED_VERSION" >> $GITHUB_OUTPUT
59+ echo "RELEASE_CHANNEL=$CHANNEL" >> $GITHUB_OUTPUT
60+
61+ docker-extension :
62+ needs : derive-version-info
63+ runs-on : ubuntu-24.04
64+ env :
65+ GIT_VERSION : ${{ needs.derive-version-info.outputs.GIT_VERSION }}
66+ GIT_STRIPPED_VERSION : ${{ needs.derive-version-info.outputs.GIT_STRIPPED_VERSION }}
67+ RELEASE_CHANNEL : ${{ needs.derive-version-info.outputs.RELEASE_CHANNEL }}
68+ steps :
69+ - name : Checkout 🛎️ repo
70+ uses : actions/checkout@v4
71+
72+ - name : Build Extension UI
73+ run : |
74+ # Build UI. Produce local package.
75+ make ui-build
76+
77+ - name : Build Extension
78+ run : |
79+ # Build service image to be deployed as a Docker extension
80+ make extension-build
81+
82+
0 commit comments