Skip to content

Update gh-actions-rpi-cmd.sh #530

Update gh-actions-rpi-cmd.sh

Update gh-actions-rpi-cmd.sh #530

Workflow file for this run

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-a8]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Build RPI environment
uses: pguyot/arm-runner-action@v2
with:
commands: ./gh-actions-rpi-cmd.sh
base_image: ${{ matrix.base_image }}
image_additional_mb: 10000
cpu: ${{ matrix.cpu }}
optimize_image: false
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"}'