Add ESP-IDF development image and workflow #1
Workflow file for this run
This file contains hidden or 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
| # ESP-IDF Docker Build Workflow | |
| name: 🐳 ESP-IDF Docker Image | |
| env: | |
| ESP_IDF_VERSION: v5.4.1 | |
| on: | |
| push: | |
| branches: [master, dev] | |
| paths: | |
| - '.github/workflows/esp-idf.yml' | |
| - '.github/workflows/reusable-docker-build.yml' | |
| - 'images/esp-idf/**' | |
| pull_request: | |
| branches: [master, dev] | |
| paths: | |
| - '.github/workflows/esp-idf.yml' | |
| - '.github/workflows/reusable-docker-build.yml' | |
| - 'images/esp-idf/**' | |
| # Manual trigger | |
| workflow_dispatch: | |
| inputs: | |
| esp_idf_version: | |
| description: 'ESP-IDF version (e.g., v5.4.1, v5.3.1)' | |
| required: false | |
| default: 'v5.4.1' | |
| type: string | |
| force_rebuild: | |
| description: 'Force rebuild without cache' | |
| required: false | |
| default: false | |
| type: boolean | |
| custom_tags: | |
| description: 'Additional custom tags (comma-separated, optional)' | |
| required: false | |
| default: '' | |
| type: string | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| esp_idf_version: ${{ steps.prepare.outputs.esp_idf_version }} | |
| custom_tags: ${{ steps.prepare.outputs.custom_tags }} | |
| steps: | |
| - name: 🏷️ Prepare ESP-IDF version and tags | |
| id: prepare | |
| run: | | |
| ESP_IDF_VERSION="${{ github.event.inputs.esp_idf_version || env.ESP_IDF_VERSION }}" | |
| CUSTOM_TAGS="${{ github.event.inputs.custom_tags || '' }}" | |
| # Add ESP-IDF version tag | |
| if [ -n "$CUSTOM_TAGS" ]; then | |
| TAGS="${CUSTOM_TAGS},${ESP_IDF_VERSION}" | |
| else | |
| TAGS="${ESP_IDF_VERSION}" | |
| fi | |
| echo "esp_idf_version=${ESP_IDF_VERSION}" >> $GITHUB_OUTPUT | |
| echo "custom_tags=${TAGS}" >> $GITHUB_OUTPUT | |
| build: | |
| needs: prepare | |
| uses: ./.github/workflows/reusable-docker-build.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| with: | |
| image_name: jethome-dev-esp-idf | |
| context_path: images/esp-idf | |
| force_rebuild: ${{ github.event.inputs.force_rebuild || false }} | |
| custom_tags: ${{ needs.prepare.outputs.custom_tags }} | |
| build_args: | | |
| ESP_IDF_VERSION=${{ needs.prepare.outputs.esp_idf_version }} | |