88 required : false
99 default : " true"
1010 type : string
11+ workflow_run_id :
12+ description : " Specific workflow run ID to check (optional, defaults to latest)"
13+ required : false
14+ type : string
15+ default : " "
16+ job_id :
17+ description : " Specific job ID to download artifacts from (optional, downloads from all jobs if not specified)"
18+ required : false
19+ type : string
20+ default : " "
1121 outputs :
1222 artifacts_url :
1323 description : " URL to retrieve build artifacts"
2333 KAS_CLONE_DEPTH : 1
2434
2535jobs :
36+ # Call the reusable workflow to download and merge nightly artifacts
37+ download-artifacts :
38+ uses : ./.github/workflows/download-nightly-artifacts.yml
39+ with :
40+ workflow_run_id : ${{ inputs.workflow_run_id }}
41+ job_id : ${{ inputs.job_id }}
42+ secrets : inherit
43+
2644 kas-setup :
27-
45+ needs : download-artifacts
2846 runs-on : [self-hosted, qcom-u2404, amd64]
2947 steps :
3048 - name : Setting up kas-container
@@ -37,15 +55,55 @@ jobs:
3755
3856 - uses : actions/checkout@v4
3957
40- - name : Run kas lock
58+ - name : Download merged configuration
59+ if : needs.download-artifacts.outputs.success == 'true'
60+ uses : actions/download-artifact@v4
61+ with :
62+ name : ${{ needs.download-artifacts.outputs.artifact_name }}
63+ path : ' ci/'
64+
65+ - name : Display and validate
66+ if : needs.download-artifacts.outputs.success == 'true'
4167 run : |
42- ${KAS_CONTAINER} lock --update ci/qcom-robotics-distro.yml
68+ echo "📄 Merged Configuration:"
69+ echo "======================="
70+
71+ if [ -f ci/qcom-robotics-distro.yml ]; then
72+ cat ci/qcom-robotics-distro.yml
73+ else
74+ echo "❌ File not found: ci/qcom-robotics-distro.yml"
75+ echo ""
76+ echo "Available files:"
77+ find ci/ -type f
78+ exit 1
79+ fi
4380
44- - name : Upload kas lockfile
45- uses : actions/upload-artifact@v6
46- with :
47- name : kas-lockfile
48- path : ci/*.lock.yml
81+ - name : Commit and push if changed
82+ run : |
83+ git config user.name "github-actions[bot]"
84+ git config user.email "github-actions[bot]@users.noreply.github.com"
85+
86+ if git diff --quiet ci/qcom-robotics-distro.yml; then
87+ echo "No changes to commit"
88+ else
89+ git add ci/qcom-robotics-distro.yml
90+ git commit -m "chore: update qcom-robotics-distro.yml with nightly commits
91+
92+ Updated from nightly build run: ${{ needs.download-artifacts.outputs.workflow_url }}
93+ Artifact: ${{ needs.download-artifacts.outputs.artifact_name }}"
94+
95+ git push
96+ fi
97+
98+ # - name: Run kas lock
99+ # run: |
100+ # ${KAS_CONTAINER} lock --update ci/qcom-robotics-distro.yml
101+
102+ # - name: Upload kas lockfile
103+ # uses: actions/upload-artifact@v4
104+ # with:
105+ # name: kas-lockfile
106+ # path: ci/*.lock.yml
49107
50108 - name : Upload kas-container
51109 uses : actions/upload-artifact@v4
68126 # path: ci
69127
70128 - name : Download kas-container
71- uses : actions/download-artifact@v6
129+ uses : actions/download-artifact@v4
72130 with :
73131 name : kas-container
74132 path : ${{ runner.temp }}
@@ -145,7 +203,7 @@ jobs:
145203 runs-on : [self-hosted, qcom-u2404, amd64]
146204 steps :
147205 - name : ' Download build URLs'
148- uses : actions/download-artifact@v6
206+ uses : actions/download-artifact@v4
149207 with :
150208 github-token : ${{ secrets.GITHUB_TOKEN }}
151209 pattern : build-url*
@@ -199,4 +257,4 @@ jobs:
199257 with open(summary_file_name, "a") as summaryfile:
200258 summaryfile.write("## Download URLs\n")
201259 summaryfile.write(table_str)
202- print(table_str)
260+ print(table_str)
0 commit comments