55 [push, workflow_dispatch]
66
77jobs :
8+ ISO :
9+ strategy :
10+ matrix :
11+ target :
12+ - image : ubuntu
13+ - image : kubuntu
14+ # - image: ubuntu-unity
815
9- ISO-Kubuntu :
1016 runs-on : ubuntu-latest
1117 steps :
1218 - uses : actions/checkout@v6
@@ -26,11 +32,13 @@ jobs:
2632 echo Version is ${VER}-${REL}
2733 echo "kver=${VER}" >> $GITHUB_ENV
2834 echo "isotag=${VER}-${REL}" >> $GITHUB_ENV
35+ CAPS=$(echo "${{ matrix.target.image }}" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2); print}')
36+ echo "caps=${CAPS}" >> $GITHUB_ENV
2937
3038 - name : Run build script
3139 run : |
3240 chmod +x ${{ github.workspace }}/build_in_docker.sh
33- ${{ github.workspace }}/build_in_docker.sh kubuntu
41+ ${{ github.workspace }}/build_in_docker.sh ${{ matrix.target.image }}
3442
3543 - name : print sha256sum
3644 run : |
@@ -41,15 +49,15 @@ jobs:
4149 - name : Upload package artifact
4250 uses : actions/upload-artifact@v7
4351 with :
44- name : ISO-Kubuntu
45- path : ${{ github.workspace }}/output/kubuntu -25.10-${{ env.kver }}-t2-questing.iso
52+ name : ISO-${{ matrix.target.image }}
53+ path : ${{ github.workspace }}/output/${{ matrix.target.image }} -25.10-${{ env.kver }}-t2-questing.iso
4654 archive : false
4755
4856 - name : Remove unsplit ISO
4957 run : |
5058 sudo rm ${{ github.workspace }}/output/*.iso
5159 - name : Release
52- if : github.ref == 'refs/heads/flavourMainline '
60+ if : github.ref == 'refs/heads/mainline '
5361 uses : softprops/action-gh-release@v2
5462 with :
5563 files : ${{ github.workspace }}/output/*
@@ -61,17 +69,17 @@ jobs:
6169 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6270
6371 - name : Update the json
64- if : github.ref == 'refs/heads/flavourMainline '
72+ if : github.ref == 'refs/heads/mainline '
6573 run : |
6674 git clone https://github.com/t2linux/wiki.git
6775 cd wiki/docs/tools
6876
6977 cat << EOF > update.py
7078 import json
7179 # Define the new links
72- new_link1 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu -25.10-${{ env.kver }}-t2-questing.iso.00"
73- new_link2 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu -25.10-${{ env.kver }}-t2-questing.iso.01"
74- new_link3 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/kubuntu -25.10-${{ env.kver }}-t2-questing.iso.02"
80+ new_link1 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/${{ matrix.target.image }} -25.10-${{ env.kver }}-t2-questing.iso.00"
81+ new_link2 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/${{ matrix.target.image }} -25.10-${{ env.kver }}-t2-questing.iso.01"
82+ new_link3 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/${{ matrix.target.image }} -25.10-${{ env.kver }}-t2-questing.iso.02"
7583 # Load the JSON file
7684 with open('distro-metadata.json', 'r') as file:
7785 data = json.load(file)
8290 distro['iso'] = new_links
8391 distro['sha256'] = sha256
8492 # Update the links
85- update_links(data['all'], "Kubuntu 25.10 - Questing Quokka", [new_link1, new_link2, new_link3], "${{ env.sha256 }}")
93+ update_links(data['all'], "${{ env.caps }} 25.10 - Questing Quokka", [new_link1, new_link2, new_link3], "${{ env.sha256 }}")
8694 # Save the updated JSON back to the file
8795 with open('distro-metadata.json', 'w') as file:
8896 json.dump(data, file, indent=2)
94102 cd -
95103
96104 - name : Push updated links to t2linux.org
97- if : github.ref == 'refs/heads/flavourMainline '
105+ if : github.ref == 'refs/heads/mainline '
98106 uses : cpina/github-action-push-to-another-repository@main
99107 env :
100108 API_TOKEN_GITHUB : ${{ secrets.PAT }}
@@ -105,105 +113,4 @@ jobs:
105113 user-email : github-actions[bot]@users.noreply.github.com
106114 user-name : github-actions[bot]
107115 target-branch : master
108- commit-message : Distro metadata - Update Kubuntu 25.10 to v${{ env.isotag }}
109-
110- ISO-Ubuntu-Unity :
111- runs-on : ubuntu-latest
112- steps :
113- - uses : actions/checkout@v6
114-
115- - name : Free up disk space for the CI
116- uses : AdityaGarg8/remove-unwanted-software@v5
117- with :
118- remove-android : ' true'
119- remove-dotnet : ' true'
120- remove-haskell : ' true'
121-
122- - name : Generate Tag
123- id : tag
124- run : |
125- VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2)
126- REL=$(egrep ^PKGREL build.sh|cut -d= -f2)
127- echo Version is ${VER}-${REL}
128- echo "kver=${VER}" >> $GITHUB_ENV
129- echo "isotag=${VER}-${REL}" >> $GITHUB_ENV
130-
131- - name : Run build script
132- run : |
133- chmod +x ${{ github.workspace }}/build_in_docker.sh
134- ${{ github.workspace }}/build_in_docker.sh ubuntu-unity
135-
136- - name : print sha256sum
137- run : |
138- cat ${{ github.workspace }}/output/sha256*
139- SHA256=$(cat ${{ github.workspace }}/output/sha256* | cut -d " " -f 1)
140- echo "sha256=${SHA256}" >> $GITHUB_ENV
141-
142- - name : Upload package artifact
143- uses : actions/upload-artifact@v7
144- with :
145- name : ISO-Ubuntu-Unity
146- path : ${{ github.workspace }}/output/ubuntu-unity-25.10-${{ env.kver }}-t2-questing.iso
147- archive : false
148-
149- - name : Remove unsplit ISO
150- run : |
151- sudo rm ${{ github.workspace }}/output/*.iso
152- - name : Release
153- if : github.ref == 'refs/heads/flavourMainline'
154- uses : softprops/action-gh-release@v2
155- with :
156- files : ${{ github.workspace }}/output/*
157- tag_name : v${{ env.isotag }}
158- # body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
159- draft : false
160- prerelease : false
161- env :
162- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
163-
164- - name : Update the json
165- if : github.ref == 'refs/heads/flavourMainline'
166- run : |
167- git clone https://github.com/t2linux/wiki.git
168- cd wiki/docs/tools
169-
170- cat << EOF > update.py
171- import json
172- # Define the new links
173- new_link1 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-25.10-${{ env.kver }}-t2-questing.iso.00"
174- new_link2 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-25.10-${{ env.kver }}-t2-questing.iso.01"
175- new_link3 = "https://github.com/t2linux/T2-Ubuntu/releases/download/v${{ env.isotag }}/ubuntu-unity-25.10-${{ env.kver }}-t2-questing.iso.02"
176- # Load the JSON file
177- with open('distro-metadata.json', 'r') as file:
178- data = json.load(file)
179- # Function to update the links
180- def update_links(distros, name, new_links, sha256):
181- for distro in distros:
182- if distro['name'] == name:
183- distro['iso'] = new_links
184- distro['sha256'] = sha256
185- # Update the links
186- update_links(data['all'], "Ubuntu Unity 25.10 - Questing Quokka", [new_link1, new_link2, new_link3], "${{ env.sha256 }}")
187- # Save the updated JSON back to the file
188- with open('distro-metadata.json', 'w') as file:
189- json.dump(data, file, indent=2)
190- print("Links updated successfully.")
191- EOF
192-
193- python3 update.py
194- rm update.py
195- cd -
196-
197- - name : Push updated links to t2linux.org
198- if : github.ref == 'refs/heads/flavourMainline'
199- uses : cpina/github-action-push-to-another-repository@main
200- env :
201- API_TOKEN_GITHUB : ${{ secrets.PAT }}
202- with :
203- source-directory : ' wiki'
204- destination-github-username : ' t2linux'
205- destination-repository-name : ' wiki'
206- user-email : github-actions[bot]@users.noreply.github.com
207- user-name : github-actions[bot]
208- target-branch : master
209- commit-message : Distro metadata - Update Ubuntu Unity 25.10 to v${{ env.isotag }}
116+ commit-message : Distro metadata - Update ${{ env.caps }} 25.10 to v${{ env.isotag }}
0 commit comments