-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
51 lines (44 loc) · 1.62 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Memfault Upload Symbol Files Action'
description: 'Upload symbol files to Memfault'
inputs:
MEMFAULT_ORG_TOKEN:
description: 'Organization Auth Token. Generate one at https://app.memfault.com/organizations/-/settings/auth-tokens'
required: true
MEMFAULT_ORG_SLUG:
description: 'Memfault Org Slug'
required: true
MEMFAULT_PROJECT_SLUG:
description: 'Memfault Project Slug'
required: true
symbol_file:
description: 'Path to the symbol file'
required: true
memfault_cli_version:
description: 'Memfault CLI Version'
required: true
default: "1.0.11"
runs:
using: 'composite'
steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Check inputs
shell: bash
run: |
[[ "${{ inputs.MEMFAULT_ORG_TOKEN }}" ]] || { echo "MEMFAULT_ORG_TOKEN input is empty" ; exit 1; }
[[ "${{ inputs.MEMFAULT_ORG_SLUG }}" ]] || { echo "MEMFAULT_ORG_SLUG input is empty" ; exit 1; }
[[ "${{ inputs.MEMFAULT_PROJECT_SLUG }}" ]] || { echo "MEMFAULT_PROJECT_SLUG input is empty" ; exit 1; }
[[ "${{ inputs.symbol_file }}" ]] || { echo "symbol_file input is empty" ; exit 1; }
- name: Install Dependencies
shell: bash
run: pip install memfault-cli==${{ inputs.memfault_cli_version }}
- name: Upload the symbol file
shell: bash
run: |
memfault \
--org-token ${{ inputs.MEMFAULT_ORG_TOKEN }} \
--org ${{ inputs.MEMFAULT_ORG_SLUG }} \
--project ${{ inputs.MEMFAULT_PROJECT_SLUG }} \
upload-mcu-symbols ${{ inputs.symbol_file }}