|
6 | 6 |
|
7 | 7 | jobs:
|
8 | 8 | deploy_protectli:
|
9 |
| - runs-on: ubuntu-22.04 |
10 | 9 | if: contains(github.ref, 'refs/tags/protectli')
|
| 10 | + uses: ./.github/workflows/deploy-template.yml |
| 11 | + with: |
| 12 | + platform: protectli |
| 13 | + vendor: ${{ matrix.vendor }} |
| 14 | + model: ${{ matrix.model }} |
11 | 15 | strategy:
|
12 | 16 | matrix:
|
13 | 17 | vendor: [ protectli ]
|
14 | 18 | model: [ vp66xx, vp46xx, vp2420, vp2410, V1210, V1211, V1410, V1610 ]
|
15 |
| - steps: |
16 |
| - - name: Checkout repository |
17 |
| - uses: actions/checkout@v4 |
18 |
| - |
19 |
| - - name: Checkout all submodules |
20 |
| - run: git submodule update --init --recursive --checkout |
21 |
| - |
22 |
| - - name: Set up tag name |
23 |
| - id: tag_name |
24 |
| - run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" |
25 |
| - |
26 |
| - - name: Parse directories from tag |
27 |
| - id: parse_directories |
28 |
| - run: | |
29 |
| - tag=${{ steps.tag_name.outputs.tag }} |
30 |
| - base_dir="protectli" |
31 |
| - model=$(echo "$tag" | cut -d'_' -f1-3) |
32 |
| - release=$(echo "$tag" | cut -d'_' -f4) |
33 |
| - echo "base_dir=$base_dir" >> "$GITHUB_OUTPUT" |
34 |
| - echo "model=$model" >> "$GITHUB_OUTPUT" |
35 |
| - echo "release=$release" >> "$GITHUB_OUTPUT" |
36 |
| -
|
37 |
| - # Allows downloading artifacts from a different workflow |
38 |
| - - name: Download workflow artifact |
39 |
| - uses: dawidd6/action-download-artifact@v6 |
40 |
| - with: |
41 |
| - workflow: build.yml |
42 |
| - name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}" |
43 |
| - path: "./artifacts" |
44 |
| - |
45 |
| - - name: Upload to Nextcloud |
46 |
| - env: |
47 |
| - CLOUD_URL: ${{ secrets.CLOUD_URL }} |
48 |
| - CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }} |
49 |
| - run: | |
50 |
| - BASE_URL="https://cloud.3mdeb.com/public.php/webdav" |
51 |
| - url_part=$(echo "$CLOUD_URL" | cut -d'/' -f6) |
52 |
| - base_dir="${{ steps.parse_directories.outputs.base_dir }}" |
53 |
| - model="${{ steps.parse_directories.outputs.model }}" |
54 |
| - release="${{ steps.parse_directories.outputs.release }}" |
55 |
| - CURL_CMD="curl -u $url_part:$CLOUD_PASSWORD" |
56 |
| -
|
57 |
| - new_name=$(echo "${{ matrix.vendor }}-${{ matrix.model }}.rom" | sed 's/-/_/g; s/.*/\L&/') |
58 |
| -
|
59 |
| - # Create release directory if it doesn't exist |
60 |
| - $CURL_CMD -X MKCOL "$BASE_URL/$base_dir/$model/$release" |
61 |
| - $CURL_CMD -X PUT -T "artifacts/coreboot.rom" "$BASE_URL/$base_dir/$model/$release/$new_name" |
62 |
| - sha256sum artifacts/coreboot.rom > ${new_name}.sha256 |
63 |
| - $CURL_CMD -X PUT -T "${new_name}.sha256" "$BASE_URL/$base_dir/$model/$release/" |
64 | 19 |
|
65 | 20 | deploy_novacustom:
|
66 |
| - runs-on: ubuntu-22.04 |
67 | 21 | if: contains(github.ref, 'refs/tags/novacustom')
|
| 22 | + uses: ./.github/workflows/deploy-template.yml |
| 23 | + with: |
| 24 | + platform: novacustom |
68 | 25 |
|
69 |
| - steps: |
70 |
| - - name: Checkout repository |
71 |
| - uses: actions/checkout@v4 |
72 |
| - |
73 |
| - - name: Checkout all submodules |
74 |
| - run: git submodule update --init --recursive --checkout |
75 |
| - |
76 |
| - - name: Set up tag name |
77 |
| - id: tag_name |
78 |
| - run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" |
79 |
| - |
80 |
| - - name: Parse directories from tag |
81 |
| - id: parse_directories |
82 |
| - run: | |
83 |
| - tag=${{ steps.tag_name.outputs.tag }} |
84 |
| - base_dir="novacustom" |
85 |
| - model=$(echo "$tag" | cut -d'_' -f1-3) |
86 |
| - release=$(echo "$tag" | cut -d'_' -f4) |
87 |
| - echo "base_dir=$base_dir" >> "$GITHUB_OUTPUT" |
88 |
| - echo "model=$model" >> "$GITHUB_OUTPUT" |
89 |
| - echo "release=$release" >> "$GITHUB_OUTPUT" |
90 |
| -
|
91 |
| - - name: Parse artifact name |
92 |
| - id: artifact_name |
93 |
| - run: | |
94 |
| - first_part=$(echo ${{ steps.tag_name.outputs.tag }} | cut -d "_" -f1) |
95 |
| - second_part=$(echo ${{ steps.tag_name.outputs.tag }} | cut -d "_" -f2-3) |
96 |
| - echo "artifact_name=dasharo-$first_part-$second_part" >> "$GITHUB_OUTPUT" |
97 |
| -
|
98 |
| - # Allows downloading artifacts from a different workflow |
99 |
| - - name: Download workflow artifact |
100 |
| - uses: dawidd6/action-download-artifact@v6 |
101 |
| - with: |
102 |
| - workflow: build.yml |
103 |
| - name: ${{ steps.artifact_name.outputs.artifact_name }} |
104 |
| - path: "./artifacts" |
105 |
| - |
106 |
| - - name: Upload to Nextcloud |
107 |
| - env: |
108 |
| - CLOUD_URL: ${{ secrets.CLOUD_URL }} |
109 |
| - CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }} |
110 |
| - run: | |
111 |
| - BASE_URL="https://cloud.3mdeb.com/public.php/webdav" |
112 |
| - url_part=$(echo "$CLOUD_URL" | cut -d'/' -f6) |
113 |
| - base_dir="${{ steps.parse_directories.outputs.base_dir }}" |
114 |
| - model="${{ steps.parse_directories.outputs.model }}" |
115 |
| - release="${{ steps.parse_directories.outputs.release }}" |
116 |
| - CURL_CMD="curl -u $url_part:$CLOUD_PASSWORD" |
117 |
| -
|
118 |
| - new_name=$(echo "${model}_${release}.rom" | sed 's/-/_/g; s/.*/\L&/') |
119 |
| -
|
120 |
| - # Create release directory if it doesn't exist |
121 |
| - $CURL_CMD -X MKCOL "$BASE_URL/$base_dir/$model/$release" |
122 |
| - $CURL_CMD -X PUT -T "artifacts/coreboot.rom" "$BASE_URL/$base_dir/$model/$release/$new_name" |
123 |
| - sha256sum artifacts/coreboot.rom > ${new_name}.sha256 |
124 |
| - $CURL_CMD -X PUT -T "${new_name}.sha256" "$BASE_URL/$base_dir/$model/$release/" |
125 | 26 | deploy_pcengines:
|
126 |
| - runs-on: ubuntu-22.04 |
127 | 27 | if: contains(github.ref, 'refs/tags/pcengines')
|
| 28 | + uses: ./.github/workflows/deploy-template.yml |
| 29 | + with: |
| 30 | + platform: pcengines |
| 31 | + vendor: ${{ matrix.vendor }} |
| 32 | + model: ${{ matrix.model }} |
| 33 | + payload: ${{ matrix.payload }} |
128 | 34 | strategy:
|
129 | 35 | matrix:
|
130 | 36 | vendor: [ pcengines ]
|
131 | 37 | model: [ apu2, apu3, apu4, apu6 ]
|
132 | 38 | payload: [ uefi ]
|
133 |
| - steps: |
134 |
| - - name: Checkout repository |
135 |
| - uses: actions/checkout@v4 |
136 |
| - |
137 |
| - - name: Checkout all submodules |
138 |
| - run: git submodule update --init --recursive --checkout |
139 |
| - |
140 |
| - - name: Set up tag name |
141 |
| - id: tag_name |
142 |
| - run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" |
143 |
| - |
144 |
| - - name: Parse directories from tag |
145 |
| - id: parse_directories |
146 |
| - run: | |
147 |
| - tag=${{ steps.tag_name.outputs.tag }} |
148 |
| - base_dir="pcengines" |
149 |
| - release=$(echo "$tag" | cut -d'_' -f3) |
150 |
| - echo "base_dir=$base_dir" >> "$GITHUB_OUTPUT" |
151 |
| - echo "release=$release" >> "$GITHUB_OUTPUT" |
152 |
| -
|
153 |
| - # Allows downloading artifacts from a different workflow |
154 |
| - - name: Download workflow artifact |
155 |
| - uses: dawidd6/action-download-artifact@v6 |
156 |
| - with: |
157 |
| - workflow: build.yml |
158 |
| - name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.payload }}" |
159 |
| - path: "./artifacts" |
160 |
| - |
161 |
| - - name: Upload to Nextcloud |
162 |
| - env: |
163 |
| - CLOUD_URL: ${{ secrets.CLOUD_URL }} |
164 |
| - CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }} |
165 |
| - run: | |
166 |
| - BASE_URL="https://cloud.3mdeb.com/public.php/webdav" |
167 |
| - url_part=$(echo "$CLOUD_URL" | cut -d'/' -f6) |
168 |
| - base_dir="${{ steps.parse_directories.outputs.base_dir }}" |
169 |
| - release="${{ steps.parse_directories.outputs.release }}" |
170 |
| - CURL_CMD="curl -u $url_part:$CLOUD_PASSWORD" |
171 |
| -
|
172 |
| - new_name=$(echo "${{ matrix.vendor }}_${{ matrix.model }}_${{ matrix.payload }}_${release}.rom" | sed 's/.*/\L&/') |
173 |
| -
|
174 |
| - # Create release directory if it doesn't exist |
175 |
| - $CURL_CMD -X MKCOL "$BASE_URL/$base_dir/pcengines_apu2/$release" |
176 |
| - $CURL_CMD -X PUT -T "artifacts/coreboot.rom" "$BASE_URL/$base_dir/pcengines_apu2/$release/$new_name" |
177 |
| - sha256sum artifacts/coreboot.rom > ${new_name}.sha256 |
178 |
| - $CURL_CMD -X PUT -T "${new_name}.sha256" "$BASE_URL/$base_dir/pcengines_apu2/$release/" |
179 | 39 |
|
180 | 40 | deploy_msi:
|
181 |
| - runs-on: ubuntu-22.04 |
182 | 41 | if: contains(github.ref, 'refs/tags/msi')
|
| 42 | + uses: ./.github/workflows/deploy-template.yml |
| 43 | + with: |
| 44 | + platform: msi |
| 45 | + type: ${{ matrix.type }} |
183 | 46 | strategy:
|
184 | 47 | matrix:
|
185 | 48 | type: [ ddr4, ddr5 ]
|
186 |
| - steps: |
187 |
| - - name: Checkout repository |
188 |
| - uses: actions/checkout@v4 |
189 |
| - |
190 |
| - - name: Checkout all submodules |
191 |
| - run: git submodule update --init --recursive --checkout |
192 |
| - |
193 |
| - - name: Set up tag name |
194 |
| - id: tag_name |
195 |
| - run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" |
196 |
| - |
197 |
| - - name: Parse directories from tag |
198 |
| - id: parse_directories |
199 |
| - run: | |
200 |
| - tag=${{ steps.tag_name.outputs.tag }} |
201 |
| - base_dir="msi" |
202 |
| - model=$(echo "$tag" | cut -d'_' -f1-2) |
203 |
| - release=$(echo "$tag" | cut -d'_' -f3) |
204 |
| - echo "base_dir=$base_dir" >> "$GITHUB_OUTPUT" |
205 |
| - echo "model=$model" >> "$GITHUB_OUTPUT" |
206 |
| - echo "release=$release" >> "$GITHUB_OUTPUT" |
207 |
| -
|
208 |
| - - name: Parse artifact name |
209 |
| - id: artifact_name |
210 |
| - run: | |
211 |
| - first_part=$(echo ${{ steps.tag_name.outputs.tag }} | cut -d "_" -f1) |
212 |
| - second_part=$(echo ${{ steps.tag_name.outputs.tag }} | cut -d "_" -f2) |
213 |
| - echo "artifact_name=dasharo-$first_part-${second_part}_${{ matrix.type }}" >> "$GITHUB_OUTPUT" |
214 |
| -
|
215 |
| - # Allows downloading artifacts from a different workflow |
216 |
| - - name: Download workflow artifact |
217 |
| - uses: dawidd6/action-download-artifact@v6 |
218 |
| - with: |
219 |
| - workflow: build.yml |
220 |
| - name: ${{ steps.artifact_name.outputs.artifact_name }} |
221 |
| - path: "./artifacts" |
222 |
| - |
223 |
| - - name: Upload to Nextcloud |
224 |
| - env: |
225 |
| - CLOUD_URL: ${{ secrets.CLOUD_URL }} |
226 |
| - CLOUD_PASSWORD: ${{ secrets.CLOUD_PASSWORD }} |
227 |
| - run: | |
228 |
| - BASE_URL="https://cloud.3mdeb.com/public.php/webdav" |
229 |
| - url_part=$(echo "$CLOUD_URL" | cut -d'/' -f6) |
230 |
| - base_dir="${{ steps.parse_directories.outputs.base_dir }}" |
231 |
| - model="${{ steps.parse_directories.outputs.model }}" |
232 |
| - release="${{ steps.parse_directories.outputs.release }}" |
233 |
| - CURL_CMD="curl -u $url_part:$CLOUD_PASSWORD" |
234 |
| -
|
235 |
| - new_name=$(echo "${model}_${{ matrix.type }}_${release}.rom" | sed 's/-/_/g; s/.*/\L&/') |
236 |
| -
|
237 |
| - # Create release directory if it doesn't exist |
238 |
| - $CURL_CMD -X MKCOL "$BASE_URL/$base_dir/$model/$release" |
239 |
| - $CURL_CMD -X PUT -T "artifacts/coreboot.rom" "$BASE_URL/$base_dir/$model/$release/$new_name" |
240 |
| - sha256sum artifacts/coreboot.rom > ${new_name}.sha256 |
241 |
| - $CURL_CMD -X PUT -T "${new_name}.sha256" "$BASE_URL/$base_dir/$model/$release/" |
0 commit comments