-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (28 loc) · 1.17 KB
/
cloud.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
name: Push production release to the cloud
on:
workflow_dispatch:
workflow_call:
jobs:
tag:
runs-on: ubuntu-latest
name: Push new release
steps:
- name: Checkout code
uses: actions/checkout@v4
# grr, why does checkout code not get latest commit?!?
- name: angry pull
run: git pull
- name: Prepare production bins for cloud
run: |
mkdir -p cloud_release
cp production/*.bin cloud_release
cp production/dongle_version.txt cloud_release/version.txt
cat cloud_release/version.txt
cd cloud_release
zip ../cloud_firmware.zip *
cd ..
- name: Push to cloud
run: |
curl -i -X POST https://charged-ota-test.azurewebsites.net/api/CreateRelease?code=${{ secrets.OTA_TEST_RELEASE_TOKEN }} --form file="@cloud_firmware.zip"
curl -i -X POST https://charged-ota-acc.azurewebsites.net/api/CreateRelease?code=${{ secrets.OTA_ACC_RELEASE_TOKEN }} --form file="@cloud_firmware.zip"
curl -i -X POST https://charged-ota-prod.azurewebsites.net/api/CreateRelease?code=${{ secrets.OTA_PROD_RELEASE_TOKEN }} --form file="@cloud_firmware.zip"