forked from verybadsoldier/esp_rgbww_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.26 KB
/
test.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
name: Application CI
on:
push:
branches: [develop]
pull_request:
branches: [develop]
repository_dispatch:
types: [frontend-build-completed]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: develop
- name: Get Latest Successful Workflow Run
id: get_run
run: |
latest_run_id=$(curl -s -H "Authorization: token ${{ secrets.artifact_download_token }}" \
"https://api.github.com/repos/pljakobs/esp_rgb_webapp2/actions/runs?status=success&branch=devel" | \
jq -r '.workflow_runs[0].id')
echo "latest_run_id=$latest_run_id" >> $GITHUB_ENV
- name: Download fileList.h artifact
run: |
echo ${{ env.latest_run_id }}&&
artifact_url=$(curl -s -H "Authorization: token ${{ secrets.artifact_download_token }}" \
"https://api.github.com/repos/pljakobs/esp_rgb_webapp2/actions/runs/${{ env.latest_run_id }}/artifacts" | \
jq -r '.artifacts[] | select(.name=="fileList.h") | .archive_download_url')
curl -L -o fileList.h.zip -H "Authorization: token ${{ secrets.artifact_download_token }}" "$artifact_url"
unzip fileList.h.zip -d ./include