use sudo to run flasher #44
Workflow file for this run
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: Createstubs | |
on: [push, workflow_dispatch] | |
jobs: | |
get_firmware: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
#---------------------------------------------- | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- name: Install dependencies | |
run: | | |
# dev versie | |
pip install -I git+https://github.com/josverl/micropython-stubber.git@action_board_stubber#subdirectory=modules/mp_downloader | |
- name: Get Preview firmwares for flashing | |
run: | | |
mp_downloader --preview | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: firmware | |
path: firmware | |
compression-level: 1 # FAST compression | |
createstubs: | |
runs-on: self-hosted | |
needs: get_firmware | |
steps: | |
- name: Checkout stubs repo | |
uses: actions/checkout@v4 | |
# - name: Checkout stubber repo (scripts) | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: josverl/micropython-stubber | |
# path: repos/micropython-stubber | |
- uses: actions/download-artifact@v4 | |
with: | |
name: firmware | |
path: firmware | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
pip install -U mpremote micropython-stubber | |
- name: Install dependencies | |
run: | | |
# dev versie | |
pip install -I git+https://github.com/josverl/micropython-stubber.git@action_board_stubber#subdirectory=modules/mp_downloader | |
- name: Update firmware to the most recent preview-build on all connected boards | |
run: | | |
echo ${{ secrets.RUNNER_USERPWD }} |sudo -S mp_flasher flash --preview | |
- name: clone Repos | |
run: | | |
stubber clone | |
- name: run board stubber | |
run: | | |
stubber get-mcu-stubs | |
- name: check in changes | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "create boardstubs" | |
git push |