From 2537dba07acac292eb7c80a5af7d6bb5cf49c504 Mon Sep 17 00:00:00 2001 From: Nanokloon Date: Tue, 29 Sep 2026 20:39:12 +0200 Subject: [PATCH] debugging 25 --- .gitea/actions/esp-idf-ci-action/action.yaml | 41 ++++++++++++-------- .gitea/workflows/build.yaml | 3 +- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.gitea/actions/esp-idf-ci-action/action.yaml b/.gitea/actions/esp-idf-ci-action/action.yaml index f768dcf..72b2fc6 100644 --- a/.gitea/actions/esp-idf-ci-action/action.yaml +++ b/.gitea/actions/esp-idf-ci-action/action.yaml @@ -5,40 +5,47 @@ branding: icon: wifi inputs: path: - description: "Relative path under $GITHUB_WORKSPACE to place the repository" - default: "" + description: "Relative path under $GITHUB_WORKSPACE containing the project" + default: "." required: false esp_idf_version: - description: "Version of ESP-IDF docker image to use" default: "latest" required: false esp_idf_docker_image: - description: "Docker Repository to obtain the ESP-IDF image from" default: "espressif/idf" required: false extra_docker_args: - description: "Additional arguments to pass to the docker run command" default: "" required: false target: - description: "ESP32 variant to build for" default: "esp32" required: false command: - description: "Command to run inside the docker container (default: builds the project)" default: "idf.py build" required: false runs: using: "composite" steps: - - run: | - export IDF_TARGET=$(echo "${{ inputs.target }}" | tr '[:upper:]' '[:lower:]' | tr -d '_-') - docker run -t \ - -e IDF_TARGET="${IDF_TARGET}" \ - -v ${GITHUB_WORKSPACE}:/app/${{ github.repository }} \ - -w /app/${{ github.repository }}/${{ inputs.path }} \ - ${{ inputs.extra_docker_args }} \ - ${{ inputs.esp_idf_docker_image }}:${{ inputs.esp_idf_version }} \ - /bin/bash -c 'git config --global --add safe.directory "*" && ${{ inputs.command }}' - shell: bash \ No newline at end of file + - shell: bash + env: + INPUT_PATH: ${{ inputs.path }} + INPUT_TARGET: ${{ inputs.target }} + INPUT_VERSION: ${{ inputs.esp_idf_version }} + INPUT_IMAGE: ${{ inputs.esp_idf_docker_image }} + INPUT_EXTRA: ${{ inputs.extra_docker_args }} + INPUT_COMMAND: ${{ inputs.command }} + run: | + set -euo pipefail + IDF_TARGET=$(echo "$INPUT_TARGET" | tr '[:upper:]' '[:lower:]' | tr -d '_-') + + echo "Workspace: $GITHUB_WORKSPACE" + ls -la "$GITHUB_WORKSPACE" # sanity check: is the checkout actually there? + + docker run --rm -t \ + -e IDF_TARGET="$IDF_TARGET" \ + -v "$GITHUB_WORKSPACE":/project \ + -w "/project/${INPUT_PATH}" \ + $INPUT_EXTRA \ + "${INPUT_IMAGE}:${INPUT_VERSION}" \ + /bin/bash -c "git config --global --add safe.directory '*' && ${INPUT_COMMAND}" \ No newline at end of file diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 73b3082..686dad4 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -13,11 +13,10 @@ jobs: uses: actions/checkout@v4 with: submodules: 'recursive' - path: "code" - run: ls -la ${GITHUB_WORKSPACE}/code - run: find ${GITHUB_WORKSPACE}/code -maxdepth 2 -name CMakeLists.txt - name: esp-idf build - uses: ./code/.gitea/actions/esp-idf-ci-action + uses: .gitea/actions/esp-idf-ci-action with: esp_idf_version: v6.0.2 target: esp32c6