-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 2.03 KB
/
esp32_push.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
on:
push:
paths:
- '.github/workflows/esp32*'
- 'actions/espressif/**'
- 'esp32/**'
branches:
- '**'
tags:
- '*'
jobs:
espressif-ESP32-build:
runs-on: ubuntu-latest
name: Testing Espressif Docker image generation.
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout required files
uses: actions/checkout@v3
with:
sparse-checkout: |
.github
actions
esp32
- if: github.ref_type == 'tag'
name: Set firmware appplication version
id: set-firmware-app-version
shell: bash
run: |
sed --in-place s/\"0.0.0\"/\"${GITHUB_REF_NAME}\"/ esp32/cloudsmets/CMakeLists.txt
- id: build-esp32-image
name: Build the ESP32 image
uses: ./actions/espressif/esp32/build
with:
project: esp32/cloudsmets
- if: github.ref_type == 'tag'
id: prepare-for-blob-upload
name: Prepare firmware for upload to Azure blob storage
shell: bash
run: |
mkdir _azure.upload
cp esp32/cloudsmets/build/cloudsmets.bin _azure.upload
cp esp32/cloudsmets/build/cloudsmets.elf _azure.upload
cp esp32/cloudsmets/build/cloudsmets.map _azure.upload
- if: github.ref_type == 'tag'
name: Upload firmware to Azure blob storage
uses: fixpoint/azblob-upload-artifact@v4
with:
connection-string: '${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}'
container: 'cloudsmets'
name: '${{ github.ref_name }}'
path: '_azure.upload'
- uses: actions/upload-artifact@v3
name: Upload firmware to GitHub artifacts storage
with:
name: espressif-firmware
path: |
esp32/cloudsmets/build/cloudsmets.bin
esp32/cloudsmets/build/cloudsmets.elf
esp32/cloudsmets/build/cloudsmets.map
retention-days: 1
if-no-files-found: error