Skip to content

Commit ac4b420

Browse files
authored
Merge pull request #1510 from NickeZ/nickez/upload-firmwares
ci: Upload artifacts and notify
2 parents ad8e4e4 + 5d2317c commit ac4b420

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci-common.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ jobs:
203203
if: matrix.target == 'firmware' && !cancelled()
204204
run: ./.ci/check-unwanted-symbols
205205

206+
- name: Upload artifact
207+
if: github.event_name == 'push' && !cancelled()
208+
uses: actions/upload-artifact@v4
209+
with:
210+
name: ${{matrix.target}}-${{github.sha}}.bin
211+
path: build*/bin/*.bin
212+
206213
doc:
207214
runs-on: ubuntu-22.04
208215
container: ${{ inputs.container-repo }}:${{ inputs.container-version }}
@@ -221,3 +228,26 @@ jobs:
221228
run: |
222229
(mkdir -p build; cd build; cmake -DDOC_GRAPHS=NO ..)
223230
make -j$(($(nproc)+1)) docs
231+
232+
report-artifacts:
233+
needs: [build]
234+
runs-on: ubuntu-22.04
235+
if: github.event_name == 'push' && !cancelled()
236+
steps:
237+
- name: Clone the repo
238+
uses: actions/checkout@v4
239+
- name: Create vars
240+
id: vars
241+
run: |
242+
echo "git_sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
243+
- name: Send message to mattermost
244+
uses: mattermost/action-mattermost-notify@master
245+
continue-on-error: true
246+
if: job.status == 'success'
247+
with:
248+
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
249+
MATTERMOST_ICON_URL: https://cdn4.iconfinder.com/data/icons/basic-ui-2-line/32/check-mark-checklist-complete-done-512.png
250+
MATTERMOST_CHANNEL: eng-artifacts
251+
TEXT: |
252+
**${{ github.repository }}: Artifacts built**
253+
([${{ github.ref_name }}](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}), [${{ steps.vars.outputs.git_sha_short }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}), [artifacts](https://github.com/${{ github.repository }}/actions/runs/${{github.run_id}}#artifacts))

0 commit comments

Comments
 (0)