-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (60 loc) · 1.89 KB
/
buildcheck.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
69
70
name: Build on Raspberry Pi
on:
push:
paths:
- "include/**"
- "src/**"
- "Makefile"
- "gh-actions-rpi-cmd.sh"
- "install-deps.sh"
workflow_dispatch:
jobs:
bumpversion:
name: auto increment version
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- run: |
pip3 install --upgrade bump2version
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
bump2version --config-file .bumpversion.cfg minor
git add -A
git push
git push --tags
build:
name: Build on ${{ matrix.cpu }}
runs-on: ubuntu-latest
needs: [bumpversion]
strategy:
matrix:
base_image: ["raspios_lite:latest"]
cpu: [arm1176, cortex-a7, cortex-a8, cortex-a53]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Build RPI environment
uses: pguyot/arm-runner-action@v2.5.2
with:
commands: ./gh-actions-rpi-cmd.sh
base_image: ${{ matrix.base_image }}
image_additional_mb: 10000
cpu: ${{ matrix.cpu }}
optimize_image: false
shell: /bin/bash
exit_on_fail: false
debug: true
notify_hx711-rpi-py:
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/master'
needs: [build]
steps:
- name: Send HTTP request
run: |
curl -XPOST -u "${{ secrets.HX711_RPI_PY_USERNAME }}:${{ secrets.HX711_RPI_PY_PAT }}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/endail/hx711-rpi-py/dispatches --data '{"event_type":"build"}'