diff --git a/Dockerfile b/Dockerfile index 815bfe7..4670857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,3 +9,9 @@ RUN apt-get update && \ && \ rm -rf /var/cache/apt && \ pip3 install platformio --break-system-packages + +ADD entrypoint.sh /entrypoint.sh + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/README.md b/README.md index b566991..a411b60 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,6 @@ jobs: - uses: actions/checkout@v3 - name: Build - uses: embedd-actions/platformio-ci@v1 + uses: embedd-actions/platformio-ci@v2 ``` diff --git a/action.yml b/action.yml index 900d8db..033ff03 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,13 @@ name: 'Platformio build' description: 'Building platformio projects' +inputs: + command: + description: 'Command' + required: true + default: pio run runs: using: 'docker' - image: 'docker://sergeyladanov/platformio:v1' + image: 'docker://sergeyladanov/platformio:v2' args: - - pio - - run + - ${{ inputs.command }} diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..1b565af --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +exec $@