File tree 2 files changed +13
-12
lines changed
2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 1
1
name : Build
2
2
3
- on : pull_request
3
+ on : push
4
4
5
5
jobs :
6
6
build-upload :
@@ -20,16 +20,19 @@ jobs:
20
20
sudo apt-get -y install libusb-1.0-0 cmake srecord
21
21
pip install -U pyserial
22
22
23
- - name : Build
23
+ - id : build
24
+ name : Build
24
25
env :
25
- PR_NUMBER : ${{ github.event.number }}
26
- run : ./scripts/build-firmware
26
+ SHA : ${{ github.event.head }}
27
+ run : |
28
+ fname=$(./scripts/build-firmware | tail -1)
29
+ echo "::set-output fname=fname::$fname"
27
30
28
31
-
uses :
keithweaver/[email protected]
29
- name : Copy PR bin to AWS
32
+ name : Copy build to AWS
30
33
with :
31
34
command : cp
32
- source : build/konnected-esp8266-PR- ${{ github.event.number }}.bin
35
+ source : build/${{ steps.build.outputs.fname }}
33
36
destination : s3://konnected-io/builds/
34
37
aws_access_key_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
35
38
aws_secret_access_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change @@ -15,11 +15,7 @@ function usage() {
15
15
set -e
16
16
17
17
if ! git describe --exact-match --tags & > /dev/null; then
18
- if [[ -z " ${PR_NUMBER} " ]]; then
19
- BRANCH=" $( git branch | sed -n -e ' s/^\* \(.*\)/\1/p' ) "
20
- else
21
- BRANCH=" PR-" ${PR_NUMBER}
22
- fi
18
+ BRANCH=" $( git branch | sed -n -e ' s/^\* \(.*\)/\1/p' ) "
23
19
else
24
20
BRANCH=" $( git describe --exact-match --tags $( git log -n1 --pretty=' %h' ) ) "
25
21
fi
@@ -108,9 +104,11 @@ echo
108
104
109
105
# Build full image
110
106
srec_cat -output " ${OUTPUT_BASE} /konnected-esp8266-${BRANCH} .bin" -binary " ${OUTPUT_BASE} /${IMAGE_NAME} .bin" -binary -fill 0xff 0x0000 0x100000 " ${OUTPUT_BASE} /konnected-filesystem-0x100000-${BRANCH} .img" -binary -offset 0x100000
107
+ echo " Wrote ${OUTPUT_BASE} /konnected-esp8266-${BRANCH} .bin"
111
108
112
109
# Copy to common name for ease of flashing
113
110
cp " ${OUTPUT_BASE} /konnected-esp8266-${BRANCH} .bin" " ${OUTPUT_BASE} /konnected-esp8266-latest.bin"
114
111
115
- echo " Build Complete: Flash this build with './scripts/flash ${BRANCH} <port>'"
112
+ echo " Build Complete:Flash this build with './scripts/flash ${BRANCH} <port>'"
113
+ echo " konnected-esp8266-${BRANCH} .bin"
116
114
You can’t perform that action at this time.
0 commit comments