This is a custom Docker image for Platformio.
- name: Run Docker container
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/zanzythebar/piodocker:latest
options: -v ${{ github.workspace }}/ESP:/workspace
run: |
export OPENIRIS_CI_BUILD=1
mkdir build
mkdir build/${{ matrix.target_name }}${{ matrix.target_build_type }}
echo "::group::pio run"
pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }}
echo "::endgroup::"
unzip -l './build/${{ matrix.target_name }}${{ matrix.target_build_type }}/*.zip'
- name: Verify build
run: |
ls -la build/${{ matrix.target_name }}${{ matrix.target_build_type }}
If you want to keep the downloaded packages, etc. you can save the PlatformIO configuration outside of the container. You can do this by adding the following line to the docker run call:
-v `$HOME/.platformio`:/.platformio \
Alternatively you could use a data volume container to save the PlatformIO configuration. First create the data volume container
docker run --name vc_platformio zanzythebar/vc_piodocker:latest
Then add the following line to the docker run call:
--volumes-from=vc_platformio \