4444 - stable
4545 - beta
4646 - dev
47+ control_ref :
48+ description : " Optional airwaves-os-control ref for gateway builds"
49+ required : false
50+ default : " "
51+ type : string
4752
4853env :
4954 REGISTRY : ghcr.io
6469 # is the tag itself, so BOTH images stamp the same version and can never
6570 # split-brain (manager 1.0.10 / gateway 1.0.8). Empty for non-tag builds.
6671 release_version : ${{ steps.chan.outputs.release_version }}
72+ control_ref : ${{ steps.chan.outputs.control_ref }}
6773 steps :
6874 - uses : actions/checkout@v4
6975
7278 env :
7379 REF : ${{ github.ref }}
7480 INPUT_CHANNEL : ${{ github.event.inputs.channel }}
81+ INPUT_CONTROL_REF : ${{ github.event.inputs.control_ref }}
7582 run : |
7683 channel="dev"
7784 if [ -n "${INPUT_CHANNEL}" ] && [ "${INPUT_CHANNEL}" != "auto" ]; then
@@ -86,13 +93,18 @@ jobs:
8693 is_stable="false"
8794 [ "${channel}" = "stable" ] && is_stable="true"
8895 release_version=""
96+ control_ref=""
8997 if [[ "${REF}" == refs/tags/v* ]]; then
9098 release_version="${REF#refs/tags/v}"
99+ control_ref="${REF#refs/tags/}"
100+ elif [ -n "${INPUT_CONTROL_REF}" ]; then
101+ control_ref="${INPUT_CONTROL_REF}"
91102 fi
92103 echo "channel=${channel}" >> "$GITHUB_OUTPUT"
93104 echo "is_stable=${is_stable}" >> "$GITHUB_OUTPUT"
94105 echo "release_version=${release_version}" >> "$GITHUB_OUTPUT"
95- echo "Resolved channel: ${channel} (is_stable=${is_stable}) release_version='${release_version}'"
106+ echo "control_ref=${control_ref}" >> "$GITHUB_OUTPUT"
107+ echo "Resolved channel: ${channel} (is_stable=${is_stable}) release_version='${release_version}' control_ref='${control_ref}'"
96108
97109 - uses : dorny/paths-filter@v3
98110 id : filter
@@ -123,7 +135,18 @@ jobs:
123135
124136 - uses : actions/checkout@v4
125137
138+ - name : Clone control app at requested ref
139+ if : ${{ needs.setup.outputs.control_ref != '' }}
140+ continue-on-error : true
141+ uses : actions/checkout@v4
142+ with :
143+ repository : ${{ env.CONTROL_APP_REPO }}
144+ path : containers/airwaves-gateway/control-app
145+ ref : ${{ needs.setup.outputs.control_ref }}
146+ token : ${{ secrets.CONTROL_APP_TOKEN || secrets.GITHUB_TOKEN }}
147+
126148 - name : Clone control app
149+ if : ${{ needs.setup.outputs.control_ref == '' }}
127150 continue-on-error : true
128151 uses : actions/checkout@v4
129152 with :
0 commit comments