Log- and param documentation #736
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Log- and param documentation | |
# Controls when the action will run. | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
update_log_param_json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out sources | |
uses: actions/checkout@v3 | |
- name: Checkout crazyflie-firmware | |
uses: actions/checkout@v3 | |
with: | |
repository: bitcraze/crazyflie-firmware | |
path: firmware | |
- name: Generate log_param_doc.json | |
run: | | |
cd firmware | |
docker run --rm -e "HOST_CW_DIR=${PWD}" \ | |
-e "CALLING_HOST_NAME=$(hostname)" -e "CALLING_UID"=$UID \ | |
-e "CALLING_OS"=$(uname) -v ${PWD}:/tb-module \ | |
-v ${HOME}/.ssh:/root/.ssh \ | |
-v /var/run/docker.sock:/var/run/docker.sock bitcraze/toolbelt \ | |
build-docs | |
- name: Update client log_param_doc.json | |
run: | | |
cp firmware/docs/api/log_param_doc.json src/cfclient/resources/ | |
git config --local user.email "[email protected]" | |
git config --local user.name "Bitcraze CI Robot" | |
git add -f src/cfclient/resources/log_param_doc.json | |
git commit -m "Update log_param_doc.json" || echo "Nothing to commit" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |