From 3adc23fc519afb4a783c5d5281cb17f3785f608f Mon Sep 17 00:00:00 2001 From: Jean-Paul van Ravensberg <14926452+DevSecNinja@users.noreply.github.com> Date: Wed, 18 Nov 2026 16:20:55 +0100 Subject: [PATCH 1/3] ci: add the standard lint and secret-scan CI Add the lint and secret-scan callers from repo-steward's workflow templates on DevSecNinja/.github v4.7.0. secret-scan.yml calls lint-include.yml with only lint-gitleaks: true. A new .mise.toml pins the lint tools the workflow installs. Clear the lint debt mechanically, with no behaviour change: dprint formats Markdown, and yamlfmt adds document start markers and block-style lists in the compose files, the release config and the CI workflow. Closes #193 --- .github/copilot-instructions.md | 19 +++- .github/release.yml | 9 +- .github/workflows/ci.yml | 21 +++-- .github/workflows/lint.yml | 47 ++++++++++ .github/workflows/secret-scan.yml | 48 ++++++++++ .mise.toml | 15 ++++ README.md | 25 ++++-- docker-compose.test.yml | 19 ++-- docker-compose.yml | 7 +- docs/CODE-QUALITY.md | 5 ++ docs/CONFIGURATION.md | 53 +++++++---- docs/CONTRIBUTING.md | 1 + docs/REQUIREMENTS.md | 90 ++++++++++--------- .../DOCKER_COMPOSE_TEST_RESULTS.md | 19 ++-- docs/test_results/TEST_RESULTS.md | 32 +++++-- 15 files changed, 309 insertions(+), 101 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/secret-scan.yml create mode 100644 .mise.toml diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 21b4cd7..91947cf 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -5,6 +5,7 @@ Always reference these instructions first and fallback to search or bash command ## Working Effectively ### Bootstrap, Build, and Test Process + - **Install system dependencies (REQUIRED):** - `sudo apt-get update && sudo apt-get install -y ffmpeg` -- takes 3 minutes. NEVER CANCEL. Set timeout to 5+ minutes. - **Setup repository:** @@ -19,6 +20,7 @@ Always reference these instructions first and fallback to search or bash command - `make security` -- takes 5 seconds. Runs bandit security scanner. ### Run the Application + - **Development mode (RECOMMENDED):** ```bash # Set environment variables explicitly (required) @@ -34,6 +36,7 @@ Always reference these instructions first and fallback to search or bash command - Use development mode instead when Docker build fails ### Validation Scenarios + - **ALWAYS test video conversion after making changes:** 1. Start the application in development mode with proper environment variables 2. Create a test video: `ffmpeg -f lavfi -i testsrc=duration=5:size=320x240:rate=1 -f lavfi -i sine=frequency=1000:duration=5 -c:v libx264 -c:a aac -shortest test_input/sample.mp4 -y` @@ -47,27 +50,32 @@ Always reference these instructions first and fallback to search or bash command ## Known Limitations and Workarounds ### Docker Build Issues + - **Problem:** `make build` fails with SSL certificate verification errors in sandboxed environments - **Workaround:** Use development mode instead: `INPUT_DIR=./test_input OUTPUT_DIR=./test_output PYTHONPATH=. python main.py` - **Note:** This is a known limitation of network-restricted environments, not a code issue ### Environment Configuration + - **Problem:** `make dev` fails because .env file is not automatically loaded - **Workaround:** Set environment variables explicitly when running Python directly - **Required variables:** `INPUT_DIR`, `OUTPUT_DIR`, `PYTHONPATH=.` ### Integration Tests + - **Problem:** Integration tests are skipped due to network access requirements - **Expected:** Tests download sample files from samples.ffmpeg.org - **Workaround:** Unit tests provide sufficient coverage for development ### Directory Permissions + - **Problem:** Permission denied errors for test directories - **Fix:** Run `sudo chown -R $(whoami):$(id -gn) test_input test_output` to fix ownership ## Common Tasks ### Make All Tests Pass + ```bash # Install dependencies if not done sudo apt-get update && sudo apt-get install -y ffmpeg # 3 min timeout @@ -82,6 +90,7 @@ make security # 5 seconds ``` ### Test Video Conversion Functionality + ```bash # Start application (in separate terminal/session) INPUT_DIR=./test_input OUTPUT_DIR=./test_output PYTHONPATH=. python main.py @@ -99,6 +108,7 @@ make health ``` ### Debug Application Issues + ```bash # Run with debug logging LOG_LEVEL=DEBUG INPUT_DIR=./test_input OUTPUT_DIR=./test_output PYTHONPATH=. python main.py @@ -111,6 +121,7 @@ curl http://localhost:8080/metrics | python3 -m json.tool ## Repository Structure ### Key Files and Directories + ``` vidaud/ โ”œโ”€โ”€ src/ # Main application code @@ -129,6 +140,7 @@ vidaud/ ``` ### Frequently Used Commands (from Makefile) + ```bash make help # Show all available commands make setup # Initial project setup (fast) @@ -144,6 +156,7 @@ make clean # Clean up Docker resources ## Configuration Reference ### Environment Variables (Required for Development) + - `INPUT_DIR=./test_input` -- Directory to monitor for video files - `OUTPUT_DIR=./test_output` -- Directory for converted audio files - `PYTHONPATH=.` -- Required for Python module imports @@ -152,22 +165,26 @@ make clean # Clean up Docker resources - `MAX_PARALLEL_JOBS=4` -- Optional: Concurrent conversion jobs ### Supported Video Formats + - **Input:** MKV, WebM, MP4, AVI, MOV, WMV - **Output:** MP3 (320kbps, 44.1kHz) or FLAC (lossless) ### Health Endpoints + - `http://localhost:8080/health` -- Application health status - `http://localhost:8080/metrics` -- Processing metrics and statistics ## CI/CD Pipeline (.github/workflows/ci.yml) The automated pipeline runs: + 1. **Tests** on Python 3.11 and 3.12 (unit + integration) 2. **Quality checks** (flake8, black, bandit security scan) 3. **Docker build** for AMD64 and ARM64 architectures 4. **Release** automation with GitHub releases ### Workflow triggers: + - Push to `main` or `feature/*` branches - Pull requests to `main` -- Version tags (`v*`) trigger releases \ No newline at end of file +- Version tags (`v*`) trigger releases diff --git a/.github/release.yml b/.github/release.yml index ffc5251..1c859d3 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,3 +1,4 @@ +--- # Configuration for automatically generated release notes # See: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes # @@ -28,7 +29,7 @@ changelog: - enhancement - feat - - title: ๐Ÿ› Bug Fixes + - title: ๐Ÿ› Bug Fixes labels: - bug - bugfix @@ -43,8 +44,8 @@ changelog: labels: - dependencies - deps - # This will catch Renovate PRs based on the "dependencies" label - # configured in renovate.json + # This will catch Renovate PRs based on the "dependencies" label + # configured in renovate.json - title: ๐Ÿ”ง Maintenance labels: @@ -77,4 +78,4 @@ changelog: - title: Other Changes labels: - - "*" \ No newline at end of file + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f42a66c..6c4c8b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,15 @@ +--- name: CI/CD Pipeline on: push: - branches: [main] - tags: ["v*"] + branches: + - main + tags: + - "v*" pull_request: - branches: [main] + branches: + - main concurrency: group: ${{ github.head_ref || github.ref_name }} @@ -23,7 +27,9 @@ jobs: contents: read strategy: matrix: - python-version: ["3.11", "3.12"] + python-version: + - "3.11" + - "3.12" steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -100,7 +106,9 @@ jobs: docker-build: runs-on: ubuntu-latest - needs: [test, lint-and-security-scan] + needs: + - test + - lint-and-security-scan permissions: contents: read packages: write @@ -184,7 +192,8 @@ jobs: release: if: startsWith(github.ref, 'refs/tags/v') - needs: [docker-build] + needs: + - docker-build runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..420382a --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,47 @@ +--- +# Lint caller that repo-steward adds to public repos without one (rule +# baseline/required-file#lint, policy/baseline.toml [[files]]). It follows +# DevSecNinja/.github workflow-templates/lint.yml and +# docs/workflow-trigger-conventions.md. Private repos get lint-private.yml. +# Renovate keeps the pin and the mise version current. When steward opens the +# PR, main becomes the repo's default branch. +name: Lint + +on: + # gitleaks scans only the PR's own commits here. The full history is + # scanned by secret-scan.yml (DevSecNinja/.github#520); this workflow's + # push run scans it too, as the reusable workflow does on every non-PR event. + pull_request: + # Public repos upload SARIF to code scanning, which needs a default-branch + # analysis as the baseline for PR alerts. + push: + branches: + - main + +permissions: + contents: read + +# One run per PR (or branch). A newer push to a PR cancels its running run; a +# running push run is never cancelled, a queued one is superseded. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + lint: + uses: DevSecNinja/.github/.github/workflows/lint.yml@231c380d4f75486e159ed2e3d806bc76ff193a43 # v4.7.0 + permissions: + contents: read + security-events: write + with: + # renovate: datasource=github-releases depName=jdx/mise + mise-version: "2026.11.9" + # The linters run from the repo's own mise config (.mise.toml): pin the + # tools it needs there. Every linter is on by default; turning off + # gitleaks, trivy, zizmor or checkov needs a repo-steward exception + # (rule security/ci-scanners). See DevSecNinja/.github + # workflow-templates/lint.yml for the other inputs. + # Spec Kit output (vendored scripts) is not linted, as the central dprint + # and yamlfmt configs exclude .specify/**. The linters stay on for the rest. + lint-shellcheck-exclude: ".specify/*" + lint-shfmt-exclude: ".specify/*" diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml new file mode 100644 index 0000000..d86355d --- /dev/null +++ b/.github/workflows/secret-scan.yml @@ -0,0 +1,48 @@ +--- +# Secret-scan caller that repo-steward adds to every repo without one (rule +# baseline/required-file#secret-scan, policy/baseline.toml [[files]]). It +# follows DevSecNinja/.github's own secret-scan-caller.yml: lint-include.yml, +# the thin variant of the reusable lint workflow where every linter is off +# unless set to true, with only gitleaks on. gitleaks scans the full git +# history on every event that isn't a pull request (DevSecNinja/.github#520), +# so new gitleaks +# rules re-check old commits. Findings stay private: public repos upload them +# to code scanning (category gitleaks/history) and log a count only; private +# repos list them in the job summary, which only collaborators can read. +# Pull requests are scanned by the lint caller (their own commits only). +# Renovate keeps the pin and the mise version current. When steward opens the +# PR, main becomes the repo's default branch. +name: Secret scan + +on: + push: + branches: + - main + schedule: + - cron: "23 5 * * 1" + workflow_dispatch: + +permissions: + contents: read + +# A scan that already started finishes; the next one queues. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + gitleaks: + uses: DevSecNinja/.github/.github/workflows/lint-include.yml@231c380d4f75486e159ed2e3d806bc76ff193a43 # v4.7.0 + permissions: + contents: read + # Public repos: the history findings go to code scanning. + security-events: write + with: + # renovate: datasource=github-releases depName=jdx/mise + mise-version: "2026.11.9" + # History findings only report (warnings); this fails the run when the + # scan or the code scanning upload fails, so a silent gap can't look + # green. gitleaks must be pinned in the repo's .mise.toml. + lint-fail-on-error: true + # lint-include.yml runs no linter unless it is set to true. + lint-gitleaks: true diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..c63ac1f --- /dev/null +++ b/.mise.toml @@ -0,0 +1,15 @@ +# Tool versions for this repository, pinned and Renovate-managed (mise manager). +# These are the lint tools run by the shared lint workflow +# (DevSecNinja/.github .github/workflows/lint.yml). The workflow installs from +# this config and fails with guidance if a tool it needs is not pinned here. +[tools] +dprint = "0.64.3" +yamlfmt = "0.21.0" +actionlint = "1.7.12" +gitleaks = "8.30.1" +shellcheck = "0.11.0" +shfmt = "3.14.1" +trivy = "0.76.1" +zizmor = "1.31.1" +"pipx:yamllint" = "1.38.0" +"pipx:checkov" = "3.4.0" \ No newline at end of file diff --git a/README.md b/README.md index ba75673..6147935 100644 --- a/README.md +++ b/README.md @@ -59,18 +59,19 @@ docker run -d \ All configuration is done through environment variables. Here are the most commonly used options: -| Variable | Default | Description | -|----------|---------|-------------| -| `OUTPUT_FORMAT` | `mp3` | Output format: `mp3` or `flac` | -| `MP3_BITRATE` | `320` | MP3 bitrate in kbps (128, 192, 320) | -| `FLAC_BIT_DEPTH` | `16` | FLAC bit depth (16, 24) | -| `MAX_PARALLEL_JOBS` | `4` | Number of concurrent conversion jobs | -| `SKIP_EXISTING` | `true` | Skip conversion if output file exists | -| `LOG_LEVEL` | `INFO` | Logging level (DEBUG, INFO, WARN, ERROR) | +| Variable | Default | Description | +| ------------------- | ------- | ---------------------------------------- | +| `OUTPUT_FORMAT` | `mp3` | Output format: `mp3` or `flac` | +| `MP3_BITRATE` | `320` | MP3 bitrate in kbps (128, 192, 320) | +| `FLAC_BIT_DEPTH` | `16` | FLAC bit depth (16, 24) | +| `MAX_PARALLEL_JOBS` | `4` | Number of concurrent conversion jobs | +| `SKIP_EXISTING` | `true` | Skip conversion if output file exists | +| `LOG_LEVEL` | `INFO` | Logging level (DEBUG, INFO, WARN, ERROR) | ### Example Configurations **High-Quality FLAC Output:** + ```bash docker run -d \ --name vidaud-flac \ @@ -83,6 +84,7 @@ docker run -d \ ``` **Performance Tuning:** + ```bash docker run -d \ --name vidaud-performance \ @@ -100,16 +102,19 @@ docker run -d \ ## ๐Ÿ“Š Monitoring ### Health Check + ```bash curl http://localhost:8080/health ``` ### Metrics + ```bash curl http://localhost:8080/metrics ``` ### Logs + ```bash # View container logs docker logs vidaud @@ -136,19 +141,23 @@ The application intelligently extracts metadata from filenames and folder struct ### Common Issues **Permission Errors:** + - Ensure the container user (UID 1000) has write access to output directory - Use `sudo chown -R 1000:1000 /your/audio/path` **No Files Processed:** + - Check that input files are in supported formats - Verify files are stable (not being written to) - Check logs: `docker logs vidaud` **High CPU Usage:** + - Reduce `MAX_PARALLEL_JOBS` for lower-end systems - Set Docker resource limits: `--cpus="2.0" --memory="2g"` **Health Check Issues:** + - Ensure port 8080 is accessible - Check container status: `docker ps` - View detailed logs for error messages diff --git a/docker-compose.test.yml b/docker-compose.test.yml index bc89774..753eeda 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -1,10 +1,11 @@ +--- services: vidaud: build: context: . dockerfile: Dockerfile container_name: vidaud-test - restart: "no" # Don't restart for testing + restart: "no" # Don't restart for testing volumes: # Mount our test directories - ${COMPOSE_TEST_INPUT:-./docker_test_input}:/input:ro @@ -12,29 +13,33 @@ services: environment: # Output format: mp3 or flac OUTPUT_FORMAT: flac - + # Parallel processing (adjust based on your CPU) MAX_PARALLEL_JOBS: 2 - + # File naming customization FILENAME_PREFIX: "flac_" FILENAME_POSTFIX: "_lossless" - + # Processing settings (shorter for testing) STABILITY_PERIOD_SECONDS: 5 MAX_RETRIES: 2 RETRY_DELAY_SECONDS: 10 - + # Logging LOG_LEVEL: INFO - + # Health check port HEALTH_PORT: 8080 ports: # Health check endpoint - "8080:8080" healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080/health"] + test: + - "CMD" + - "curl" + - "-f" + - "http://localhost:8080/health" interval: 15s timeout: 5s retries: 2 diff --git a/docker-compose.yml b/docker-compose.yml index e808e35..8905b99 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ +--- services: vidaud: build: @@ -35,7 +36,11 @@ services: # Health check endpoint - "8080:8080" healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080/health"] + test: + - "CMD" + - "curl" + - "-f" + - "http://localhost:8080/health" interval: 30s timeout: 10s retries: 3 diff --git a/docs/CODE-QUALITY.md b/docs/CODE-QUALITY.md index c204b41..e33d890 100644 --- a/docs/CODE-QUALITY.md +++ b/docs/CODE-QUALITY.md @@ -18,20 +18,24 @@ Contains settings for the flake8 linter: Contains configuration for multiple Python tools: #### `[tool.black]` - Code Formatting + - **Target versions**: Python 3.11, 3.12 - **Line length**: 88 characters - **Exclusions**: Build artifacts, virtual environments, dev containers #### `[tool.pytest.ini_options]` - Testing + - **Test discovery**: Automatic discovery of test files and functions - **Markers**: Unit, integration, and slow test categorization - **Coverage**: Source code coverage reporting #### `[tool.bandit]` - Security Scanning + - **Exclusions**: Test directories (tests often contain intentionally insecure code) - **Skipped checks**: Assert usage (B101) for test files #### `[tool.coverage.run]` - Coverage Configuration + - **Source tracking**: Only track `src/` directory - **Exclusions**: Test files, cache directories @@ -107,6 +111,7 @@ To modify the configuration: 4. **Security rules**: Edit `[tool.bandit]` in `pyproject.toml` Changes will automatically apply to: + - Local development (Makefile commands) - VS Code DevContainer environment - CI/CD pipeline execution diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 2a9c744..e62a919 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -6,27 +6,28 @@ Complete reference for all configuration options available in vidaud. All configuration is done through environment variables. Below is a comprehensive table of all available options: -| Variable | Type | Default | Description | Example | -|----------|------|---------|-------------|---------| -| **INPUT_DIR** | Path | `/input` | Directory to monitor for video files | `/mnt/videos` | -| **OUTPUT_DIR** | Path | `/output` | Directory for converted audio files | `/mnt/audio` | -| **OUTPUT_FORMAT** | String | `mp3` | Output audio format | `mp3`, `flac` | -| **FILENAME_PREFIX** | String | `` | Prefix added to all output filenames | `converted_` | -| **FILENAME_POSTFIX** | String | `` | Postfix added to all output filenames | `_processed` | -| **MP3_BITRATE** | Integer | `320` | MP3 bitrate in kbps | `128`, `192`, `320` | -| **FLAC_BIT_DEPTH** | Integer | `16` | FLAC bit depth | `16`, `24` | -| **SKIP_EXISTING** | Boolean | `true` | Skip conversion if output file exists | `true`, `false` | -| **MAX_PARALLEL_JOBS** | Integer | `4` | Number of concurrent conversion jobs | `1`, `8`, `16` | -| **STABILITY_PERIOD_SECONDS** | Integer | `30` | Wait time before processing new files | `10`, `60`, `120` | -| **MAX_RETRIES** | Integer | `3` | Number of retry attempts for failed conversions | `1`, `5`, `10` | -| **RETRY_DELAY_SECONDS** | Integer | `60` | Base delay between retry attempts | `30`, `120`, `300` | -| **POLLING_INTERVAL_SECONDS** | Integer | `10` | Interval for checking pending files | `5`, `15`, `30` | -| **LOG_LEVEL** | String | `INFO` | Logging verbosity level | `DEBUG`, `INFO`, `WARN`, `ERROR` | -| **HEALTH_PORT** | Integer | `8080` | Port for health check endpoint | `8080`, `9000` | +| Variable | Type | Default | Description | Example | +| ---------------------------- | ------- | --------- | ----------------------------------------------- | -------------------------------- | +| **INPUT_DIR** | Path | `/input` | Directory to monitor for video files | `/mnt/videos` | +| **OUTPUT_DIR** | Path | `/output` | Directory for converted audio files | `/mnt/audio` | +| **OUTPUT_FORMAT** | String | `mp3` | Output audio format | `mp3`, `flac` | +| **FILENAME_PREFIX** | String | `` | Prefix added to all output filenames | `converted_` | +| **FILENAME_POSTFIX** | String | `` | Postfix added to all output filenames | `_processed` | +| **MP3_BITRATE** | Integer | `320` | MP3 bitrate in kbps | `128`, `192`, `320` | +| **FLAC_BIT_DEPTH** | Integer | `16` | FLAC bit depth | `16`, `24` | +| **SKIP_EXISTING** | Boolean | `true` | Skip conversion if output file exists | `true`, `false` | +| **MAX_PARALLEL_JOBS** | Integer | `4` | Number of concurrent conversion jobs | `1`, `8`, `16` | +| **STABILITY_PERIOD_SECONDS** | Integer | `30` | Wait time before processing new files | `10`, `60`, `120` | +| **MAX_RETRIES** | Integer | `3` | Number of retry attempts for failed conversions | `1`, `5`, `10` | +| **RETRY_DELAY_SECONDS** | Integer | `60` | Base delay between retry attempts | `30`, `120`, `300` | +| **POLLING_INTERVAL_SECONDS** | Integer | `10` | Interval for checking pending files | `5`, `15`, `30` | +| **LOG_LEVEL** | String | `INFO` | Logging verbosity level | `DEBUG`, `INFO`, `WARN`, `ERROR` | +| **HEALTH_PORT** | Integer | `8080` | Port for health check endpoint | `8080`, `9000` | ## Docker Run Examples ### Basic Usage + ```bash docker run -d \ --name vidaud \ @@ -36,6 +37,7 @@ docker run -d \ ``` ### High-Quality FLAC Output + ```bash docker run -d \ --name vidaud-flac \ @@ -48,6 +50,7 @@ docker run -d \ ``` ### Performance Tuning + ```bash docker run -d \ --name vidaud-performance \ @@ -62,6 +65,7 @@ docker run -d \ ``` ### Debug Configuration + ```bash docker run -d \ --name vidaud-debug \ @@ -76,6 +80,7 @@ docker run -d \ ## Docker Compose Configuration ### Basic Setup + ```yaml services: vidaud: @@ -93,6 +98,7 @@ services: ``` ### Advanced Configuration + ```yaml services: vidaud: @@ -138,6 +144,7 @@ services: ### File Format Support **Input Formats:** + - MKV (Matroska Video) - WebM (Web Media) - MP4 (MPEG-4) @@ -146,6 +153,7 @@ services: - WMV (Windows Media Video) **Output Formats:** + - **MP3**: Lossy compression, Plex-compatible - Bitrates: 128, 192, 256, 320 kbps - Sample rate: 44.1 kHz @@ -158,18 +166,22 @@ services: ### Performance Guidelines **CPU-bound workloads:** + - Set `MAX_PARALLEL_JOBS` to match CPU cores - Higher values may cause system overload **I/O-bound workloads:** + - Increase `MAX_PARALLEL_JOBS` beyond CPU cores - Consider storage speed and network latency **Memory considerations:** + - Each job uses ~100-500MB depending on file size - Monitor memory usage with multiple jobs **Storage optimization:** + - Use `SKIP_EXISTING=true` to avoid reprocessing - Consider separate volumes for input and output @@ -186,6 +198,7 @@ The application implements exponential backoff for failed conversions: ### Health Monitoring **Health endpoint**: `http://localhost:8080/health` + ```json { "status": "healthy", @@ -196,6 +209,7 @@ The application implements exponential backoff for failed conversions: ``` **Metrics endpoint**: `http://localhost:8080/metrics` + ```json { "files_processed": 42, @@ -216,12 +230,14 @@ The application implements exponential backoff for failed conversions: ### Troubleshooting Configuration **High CPU usage:** + ```bash # Reduce parallel jobs -e MAX_PARALLEL_JOBS=2 ``` **Slow processing:** + ```bash # Increase parallel jobs (if system can handle it) -e MAX_PARALLEL_JOBS=8 @@ -230,6 +246,7 @@ The application implements exponential backoff for failed conversions: ``` **Memory issues:** + ```bash # Reduce parallel jobs -e MAX_PARALLEL_JOBS=1 @@ -238,6 +255,7 @@ The application implements exponential backoff for failed conversions: ``` **File detection issues:** + ```bash # Increase polling frequency -e POLLING_INTERVAL_SECONDS=5 @@ -246,6 +264,7 @@ The application implements exponential backoff for failed conversions: ``` **Network errors (for integration tests):** + ```bash # Increase retry settings -e MAX_RETRIES=10 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 40c6afc..e495051 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -97,6 +97,7 @@ open htmlcov/index.html ### Test Results All 17 tests pass successfully: + - โœ… Unit tests: Configuration, conversion logic, monitoring - โœ… Integration tests: Real video file conversion with FFmpeg samples - โœ… Docker tests: Container functionality and health checks diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index 8490445..6f3adbc 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -1,54 +1,55 @@ # vidaud Requirements ## Implementation Status + **Current Version**: 1.0.0 โœ… **All core requirements implemented and tested** -| Ref | Requirement | MoSCoW Priority | Status | Implementation Notes | -|-----|-------------|-----------------|--------|----------------------| -| **F1** | Watch mounted volume and nested directories for new video files | **Must** | โœ… **DONE** | Uses efficient `inotify` via Python watchdog | -| **F2** | Convert `mkv`, `webm` and `mp4` video files to `mp3` by default | **Must** | โœ… **DONE** | Also supports `avi`, `mov`, `wmv` formats | -| **F3** | Support lossless FLAC output | **Must** | โœ… **DONE** | Configurable via `OUTPUT_FORMAT=flac` | -| **F4** | Maintain original folder structure for output | **Must** | โœ… **DONE** | Perfect 1:1 directory mapping | -| **F5** | Plex-compatible naming for audio files | **Must** | โœ… **DONE** | Supports Artist - Track format detection | -| **F6** | Embed audio metadata (Title, Artist, Album, Track #) | **Must** | โœ… **DONE** | Auto-extracts from filenames and folder structure | -| **F7** | Configurable filename prefix/postfix | **Must** | โœ… **DONE** | `FILENAME_PREFIX` and `FILENAME_POSTFIX` env vars | -| **F8** | Support parallel processing with configurable job count | **Must** | โœ… **DONE** | `MAX_PARALLEL_JOBS` (default: 4) | -| **F9** | Thread/process safety for parallel jobs | **Must** | โœ… **DONE** | Async-safe with proper file locking | -| **F10** | Detect and avoid partial files until stable | **Must** | โœ… **DONE** | `STABILITY_PERIOD_SECONDS` (default: 30s) | -| **F11** | Use temporary file naming until conversion finishes | **Must** | โœ… **DONE** | `.tmp` suffix during processing | -| **F12** | Retry failed conversions (configurable attempts) | **Must** | โœ… **DONE** | `MAX_RETRIES=3`, exponential backoff | -| **F13** | Support long file paths without errors | **Must** | โœ… **DONE** | Uses Python pathlib for robust path handling | -| **F14** | Allow HDDs to spin down when idle | **Must** | โœ… **DONE** | Polling interval: `POLLING_INTERVAL_SECONDS=10` | -| **F15** | Log major events to stdout/stderr | **Must** | โœ… **DONE** | Structured logging for Docker | -| **F16** | Log levels: DEBUG, INFO, WARN, ERROR | **Must** | โœ… **DONE** | `LOG_LEVEL` environment variable | -| **F17** | Automated tests for file conversion, prefix/postfix, metadata, retries | **Must** | โœ… **DONE** | 17 comprehensive tests (unit + integration) | -| **F18** | Build & release automation via GitHub Actions | **Must** | โœ… **DONE** | Complete CI/CD pipeline with auto-releases | -| **F19** | Semantic Versioning for releases | **Must** | โœ… **DONE** | Git tags trigger automated releases | -| **F20** | Dependency updates managed by Renovate | **Must** | โœ… **DONE** | Automated security and dependency updates | -| **F21** | Local Docker build without dependencies from pipeline artifacts | **Must** | โœ… **DONE** | Self-contained Dockerfile | -| **F22** | Docker image published as GitHub Container Registry artifact | **Must** | โœ… **DONE** | Published to `ghcr.io/devsecninja/vidaud` | -| **NF1** | Lightweight container with minimal dependencies | **Must** | โœ… **DONE** | Multi-stage build, Python 3.11-slim base | -| **NF2** | Graceful handling of corrupted video files | **Must** | โœ… **DONE** | FFmpeg error handling with retry logic | -| **NF3** | Avoid duplicate processing of same file | **Must** | โœ… **DONE** | MD5 hashing and `SKIP_EXISTING=true` | -| **NF4** | Multi-arch Docker images (ARM & x86_64) | **Should** | โœ… **DONE** | Built for `linux/amd64` and `linux/arm64` | -| **NF5** | Run as non-root | **Must** | โœ… **DONE** | UID 1000 user with proper permissions | -| **NF6** | Keep dependencies up to date & free from vulnerabilities | **Must** | โœ… **DONE** | Renovate + Bandit scanning | -| **NF7** | Clean, modular, documented codebase | **Must** | โœ… **DONE** | Comprehensive documentation and type hints | -| **NF8** | Detailed logs with timestamps and file paths | **Must** | โœ… **DONE** | Structured logging with context | -| **NF9** | Configurable output formats beyond MP3/FLAC | **Could** | โณ **FUTURE** | Currently supports MP3 (320kbps) and FLAC | -| **NF10** | Batch processing for large initial imports | **Could** | โณ **FUTURE** | Current parallel processing handles this well | -| **NF11** | Webhook integration to trigger Plex library refresh | **Could** | โณ **FUTURE** | Manual refresh recommended for now | -| **NF12** | Resource usage metrics & health endpoint | **Could** | โœ… **DONE** | `/health` and `/metrics` endpoints on port 8080 | -| **NF13** | Audio quality control (configurable bitrate/bit depth) | **Should** | โœ… **DONE** | `MP3_BITRATE=320`, `FLAC_BIT_DEPTH=16` env vars | -| **NF14** | Development environment with pre-configured tools | **Could** | โœ… **DONE** | VS Code devcontainer with Python, Docker, linting | -| **NF15** | Automated code quality tools (linting, formatting, security) | **Must** | โœ… **DONE** | `.flake8`, `pyproject.toml` configs, CI integration | -| **NF16** | Docker Compose orchestration support | **Should** | โœ… **DONE** | Ready-to-use `docker-compose.yml` with volume mounting | -| **NF17** | Built-in health checks for container monitoring | **Should** | โœ… **DONE** | `HEALTHCHECK` directive + FastAPI endpoints | -| **NF18** | Configuration validation at startup | **Must** | โœ… **DONE** | Fail-fast validation of all environment variables | -| **NF19** | Graceful shutdown with signal handling | **Must** | โœ… **DONE** | Proper cleanup on SIGTERM/SIGINT signals | +| Ref | Requirement | MoSCoW Priority | Status | Implementation Notes | +| -------- | ---------------------------------------------------------------------- | --------------- | ------------- | ------------------------------------------------------ | +| **F1** | Watch mounted volume and nested directories for new video files | **Must** | โœ… **DONE** | Uses efficient `inotify` via Python watchdog | +| **F2** | Convert `mkv`, `webm` and `mp4` video files to `mp3` by default | **Must** | โœ… **DONE** | Also supports `avi`, `mov`, `wmv` formats | +| **F3** | Support lossless FLAC output | **Must** | โœ… **DONE** | Configurable via `OUTPUT_FORMAT=flac` | +| **F4** | Maintain original folder structure for output | **Must** | โœ… **DONE** | Perfect 1:1 directory mapping | +| **F5** | Plex-compatible naming for audio files | **Must** | โœ… **DONE** | Supports Artist - Track format detection | +| **F6** | Embed audio metadata (Title, Artist, Album, Track #) | **Must** | โœ… **DONE** | Auto-extracts from filenames and folder structure | +| **F7** | Configurable filename prefix/postfix | **Must** | โœ… **DONE** | `FILENAME_PREFIX` and `FILENAME_POSTFIX` env vars | +| **F8** | Support parallel processing with configurable job count | **Must** | โœ… **DONE** | `MAX_PARALLEL_JOBS` (default: 4) | +| **F9** | Thread/process safety for parallel jobs | **Must** | โœ… **DONE** | Async-safe with proper file locking | +| **F10** | Detect and avoid partial files until stable | **Must** | โœ… **DONE** | `STABILITY_PERIOD_SECONDS` (default: 30s) | +| **F11** | Use temporary file naming until conversion finishes | **Must** | โœ… **DONE** | `.tmp` suffix during processing | +| **F12** | Retry failed conversions (configurable attempts) | **Must** | โœ… **DONE** | `MAX_RETRIES=3`, exponential backoff | +| **F13** | Support long file paths without errors | **Must** | โœ… **DONE** | Uses Python pathlib for robust path handling | +| **F14** | Allow HDDs to spin down when idle | **Must** | โœ… **DONE** | Polling interval: `POLLING_INTERVAL_SECONDS=10` | +| **F15** | Log major events to stdout/stderr | **Must** | โœ… **DONE** | Structured logging for Docker | +| **F16** | Log levels: DEBUG, INFO, WARN, ERROR | **Must** | โœ… **DONE** | `LOG_LEVEL` environment variable | +| **F17** | Automated tests for file conversion, prefix/postfix, metadata, retries | **Must** | โœ… **DONE** | 17 comprehensive tests (unit + integration) | +| **F18** | Build & release automation via GitHub Actions | **Must** | โœ… **DONE** | Complete CI/CD pipeline with auto-releases | +| **F19** | Semantic Versioning for releases | **Must** | โœ… **DONE** | Git tags trigger automated releases | +| **F20** | Dependency updates managed by Renovate | **Must** | โœ… **DONE** | Automated security and dependency updates | +| **F21** | Local Docker build without dependencies from pipeline artifacts | **Must** | โœ… **DONE** | Self-contained Dockerfile | +| **F22** | Docker image published as GitHub Container Registry artifact | **Must** | โœ… **DONE** | Published to `ghcr.io/devsecninja/vidaud` | +| **NF1** | Lightweight container with minimal dependencies | **Must** | โœ… **DONE** | Multi-stage build, Python 3.11-slim base | +| **NF2** | Graceful handling of corrupted video files | **Must** | โœ… **DONE** | FFmpeg error handling with retry logic | +| **NF3** | Avoid duplicate processing of same file | **Must** | โœ… **DONE** | MD5 hashing and `SKIP_EXISTING=true` | +| **NF4** | Multi-arch Docker images (ARM & x86_64) | **Should** | โœ… **DONE** | Built for `linux/amd64` and `linux/arm64` | +| **NF5** | Run as non-root | **Must** | โœ… **DONE** | UID 1000 user with proper permissions | +| **NF6** | Keep dependencies up to date & free from vulnerabilities | **Must** | โœ… **DONE** | Renovate + Bandit scanning | +| **NF7** | Clean, modular, documented codebase | **Must** | โœ… **DONE** | Comprehensive documentation and type hints | +| **NF8** | Detailed logs with timestamps and file paths | **Must** | โœ… **DONE** | Structured logging with context | +| **NF9** | Configurable output formats beyond MP3/FLAC | **Could** | โณ **FUTURE** | Currently supports MP3 (320kbps) and FLAC | +| **NF10** | Batch processing for large initial imports | **Could** | โณ **FUTURE** | Current parallel processing handles this well | +| **NF11** | Webhook integration to trigger Plex library refresh | **Could** | โณ **FUTURE** | Manual refresh recommended for now | +| **NF12** | Resource usage metrics & health endpoint | **Could** | โœ… **DONE** | `/health` and `/metrics` endpoints on port 8080 | +| **NF13** | Audio quality control (configurable bitrate/bit depth) | **Should** | โœ… **DONE** | `MP3_BITRATE=320`, `FLAC_BIT_DEPTH=16` env vars | +| **NF14** | Development environment with pre-configured tools | **Could** | โœ… **DONE** | VS Code devcontainer with Python, Docker, linting | +| **NF15** | Automated code quality tools (linting, formatting, security) | **Must** | โœ… **DONE** | `.flake8`, `pyproject.toml` configs, CI integration | +| **NF16** | Docker Compose orchestration support | **Should** | โœ… **DONE** | Ready-to-use `docker-compose.yml` with volume mounting | +| **NF17** | Built-in health checks for container monitoring | **Should** | โœ… **DONE** | `HEALTHCHECK` directive + FastAPI endpoints | +| **NF18** | Configuration validation at startup | **Must** | โœ… **DONE** | Fail-fast validation of all environment variables | +| **NF19** | Graceful shutdown with signal handling | **Must** | โœ… **DONE** | Proper cleanup on SIGTERM/SIGINT signals | -## Quality Metrics +## Quality Metrics - **Test Coverage**: 17 automated tests covering all core functionality - **Integration Tests**: Real FFmpeg video processing with sample files @@ -61,6 +62,7 @@ ## ๐Ÿš€ Deployment Ready The implementation is **production-ready** with: + - โœ… Comprehensive error handling and logging - โœ… Security best practices (non-root, vulnerability scanning) - โœ… Multi-architecture container support diff --git a/docs/test_results/DOCKER_COMPOSE_TEST_RESULTS.md b/docs/test_results/DOCKER_COMPOSE_TEST_RESULTS.md index 0e48b8e..3934553 100644 --- a/docs/test_results/DOCKER_COMPOSE_TEST_RESULTS.md +++ b/docs/test_results/DOCKER_COMPOSE_TEST_RESULTS.md @@ -7,13 +7,15 @@ The vidaud Docker Compose setup has been **successfully tested** and works perfe ### ๐Ÿงช **Tests Performed** #### 1. MP3 Conversion Test + - **Configuration**: MP3 output with `dockertest_` prefix - **Input**: `wmv1.wmv` and `sample_video.wmv` - **Results**: โœ… Both files converted successfully - **Output**: High-quality 320kbps MP3 files - **Timing**: ~0.2 seconds per file -#### 2. FLAC Conversion Test +#### 2. FLAC Conversion Test + - **Configuration**: FLAC output with `flac_` prefix and `_lossless` postfix - **Input**: Same video files - **Results**: โœ… Both files converted to lossless FLAC @@ -21,11 +23,13 @@ The vidaud Docker Compose setup has been **successfully tested** and works perfe - **Timing**: ~0.17 seconds per file #### 3. Live Monitoring Test + - **Test**: Added new video file while container running - **Results**: โœ… Automatically detected and converted - **Detection**: ~6 seconds (stability period: 5 seconds) #### 4. Health Check Test + - **Health Endpoint**: โœ… `http://localhost:8080/health` - **Metrics Endpoint**: โœ… `http://localhost:8080/metrics` - **Docker Health**: โœ… Container reports as healthy @@ -63,16 +67,16 @@ services: ### ๐Ÿ“ **File Results** -| Input File | MP3 Output | FLAC Output | Status | -|-----------|------------|-------------|---------| -| `wmv1.wmv` | `dockertest_wmv1.mp3` (163KB) | `flac_wmv1_lossless.flac` (758KB) | โœ… | -| `new_video.wmv` | `dockertest_new_video.mp3` (163KB) | `flac_new_video_lossless.flac` (758KB) | โœ… | +| Input File | MP3 Output | FLAC Output | Status | +| --------------- | ---------------------------------- | -------------------------------------- | ------ | +| `wmv1.wmv` | `dockertest_wmv1.mp3` (163KB) | `flac_wmv1_lossless.flac` (758KB) | โœ… | +| `new_video.wmv` | `dockertest_new_video.mp3` (163KB) | `flac_new_video_lossless.flac` (758KB) | โœ… | ### ๐Ÿš€ **Performance Metrics** - **Container Startup**: ~10 seconds to ready - **File Detection**: Real-time with inotify -- **Conversion Speed**: +- **Conversion Speed**: - MP3: ~0.2s per file - FLAC: ~0.17s per file (faster!) - **Parallel Processing**: โœ… Multiple files processed simultaneously @@ -116,8 +120,9 @@ docker-compose down ## โœ… **Conclusion** The vidaud Docker Compose setup is **production-ready** and successfully demonstrates: + - Robust video-to-audio conversion -- Real-time directory monitoring +- Real-time directory monitoring - Configurable output formats - Health monitoring capabilities - Secure containerized deployment diff --git a/docs/test_results/TEST_RESULTS.md b/docs/test_results/TEST_RESULTS.md index a7d3f7d..fcb4563 100644 --- a/docs/test_results/TEST_RESULTS.md +++ b/docs/test_results/TEST_RESULTS.md @@ -1,6 +1,7 @@ # Test Results Summary ## Test Files Used + - **Primary Sample**: https://samples.ffmpeg.org/testsuite/wmv1.wmv - **Credit**: FFmpeg Project Test Suite (https://samples.ffmpeg.org/) - **Format**: WMV (Windows Media Video) @@ -11,13 +12,16 @@ ## Test Results โœ… ### 1. Integration Test: MP3 Conversion + **Test**: `test_ffmpeg_wmv_sample_mp3_conversion` **Command:** + ```bash pytest tests/test_integration.py::TestRealVideoConversion::test_ffmpeg_wmv_sample_mp3_conversion -v ``` **Results:** + - โœ… **File Download**: Official FFmpeg sample downloaded automatically - โœ… **File Detection**: WMV format properly recognized - โœ… **Conversion Success**: Converted to MP3 format @@ -27,13 +31,16 @@ pytest tests/test_integration.py::TestRealVideoConversion::test_ffmpeg_wmv_sampl - โœ… **Performance**: Conversion completed in ~0.4 seconds ### 2. Integration Test: FLAC Conversion + **Test**: `test_ffmpeg_wmv_sample_flac_conversion` **Command:** + ```bash pytest tests/test_integration.py::TestRealVideoConversion::test_ffmpeg_wmv_sample_flac_conversion -v ``` **Results:** + - โœ… **Lossless Conversion**: FLAC format output - โœ… **Filename Prefix**: "test_" prefix applied correctly - โœ… **Quality**: Lossless audio quality maintained @@ -42,17 +49,21 @@ pytest tests/test_integration.py::TestRealVideoConversion::test_ffmpeg_wmv_sampl - โœ… **Performance**: Conversion completed in ~0.4 seconds ### 3. Integration Test: Metadata Extraction + **Test**: `test_metadata_extraction_from_filename` **Results:** + - โœ… **Artist-Title Pattern**: "Artist - Song Title" parsed correctly - โœ… **Album Detection**: Parent directory used as album name - โœ… **Track Number**: Default track number assigned ### 4. Integration Test: End-to-End Monitoring + **Test**: `test_end_to_end_monitoring_and_conversion` **Results:** + - โœ… **File Monitoring**: Real-time file detection - โœ… **Stability Period**: Configurable wait before processing - โœ… **Automatic Conversion**: Complete workflow testing @@ -61,40 +72,46 @@ pytest tests/test_integration.py::TestRealVideoConversion::test_ffmpeg_wmv_sampl ## Technical Details ### FFmpeg Command Analysis + The integration test confirmed that the application correctly uses: **MP3 Conversion:** + ```bash ffmpeg -i input.wmv -vn -acodec libmp3lame -b:a 320k -ar 44100 output.mp3 -y ``` **FLAC Conversion:** + ```bash ffmpeg -i input.wmv -vn -acodec flac -compression_level 5 output.flac -y ``` ### File Format Verification + - **MP3**: ID3v2.4 tags with proper metadata embedding - **FLAC**: Native FLAC metadata blocks with lossless audio - **Temporary Files**: Proper `.tmp_filename_timestamp.ext` naming for atomic operations ## Performance Metrics -| Test Type | Duration | Output Quality | File Size | Status | -|-----------|----------|---------------|-----------|--------| -| MP3 Conversion | ~0.4s | 320kbps lossy | 163 KB | โœ… Pass | -| FLAC Conversion | ~0.4s | Lossless | 758 KB | โœ… Pass | -| Metadata Extraction | <0.1s | N/A | N/A | โœ… Pass | -| E2E Monitoring | ~11s | Variable | Variable | โœ… Pass | +| Test Type | Duration | Output Quality | File Size | Status | +| ------------------- | -------- | -------------- | --------- | ------- | +| MP3 Conversion | ~0.4s | 320kbps lossy | 163 KB | โœ… Pass | +| FLAC Conversion | ~0.4s | Lossless | 758 KB | โœ… Pass | +| Metadata Extraction | <0.1s | N/A | N/A | โœ… Pass | +| E2E Monitoring | ~11s | Variable | Variable | โœ… Pass | ## Test Infrastructure ### Test Categories + - **Unit Tests**: 13 tests covering individual components - **Integration Tests**: 4 tests using real FFmpeg samples - **Total Coverage**: 17 test cases ### Test Commands + ```bash # All tests make test @@ -112,12 +129,14 @@ pytest tests/test_integration.py::TestRealVideoConversion::test_ffmpeg_wmv_sampl ## Bug Fixes During Testing ### Fixed: Temporary File Extension Issue + **Problem**: FFmpeg couldn't detect output format for temporary files **Solution**: Updated `get_temp_output_path()` to preserve file extensions **Before**: `.tmp_filename_timestamp` **After**: `.tmp_filename_timestamp.ext` ### Fixed: Unit Test Assertion + **Problem**: Test expected old temporary filename pattern **Solution**: Updated test to match new pattern with preserved extension @@ -128,6 +147,7 @@ Special thanks to the **FFmpeg Project** for providing official test samples at ## Conclusion All integration tests pass successfully, confirming that the vidaud application: + - โœ… Correctly processes real video files from FFmpeg's test suite - โœ… Produces high-quality audio output in both MP3 and FLAC formats - โœ… Handles metadata extraction and embedding properly From d61b6d8895f9a94abd4ff788fa1a2893071bdf78 Mon Sep 17 00:00:00 2001 From: Jean-Paul van Ravensberg <14926452+DevSecNinja@users.noreply.github.com> Date: Wed, 18 Nov 2026 16:29:03 +0100 Subject: [PATCH 2/3] ci: quote GITHUB_OUTPUT for actionlint Quote $GITHUB_OUTPUT in the step that lowercases the image name, as actionlint's shellcheck asks (SC2086). No behaviour change. Refs #193 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c4c8b3..cef7644 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,7 @@ jobs: - name: Set lowercase image name id: image_name - run: echo "value=$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT + run: echo "value=$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" - name: Log in to Container Registry if: github.event_name != 'pull_request' From 03473a10efacf1537df00ac3d9a8fbb1119bccce Mon Sep 17 00:00:00 2001 From: Jean-Paul van Ravensberg <14926452+DevSecNinja@users.noreply.github.com> Date: Wed, 18 Nov 2026 16:38:29 +0100 Subject: [PATCH 3/3] ci: read IMAGE_NAME from the environment Read IMAGE_NAME from the environment instead of expanding ${{ env.IMAGE_NAME }} into the script (zizmor template-injection). The workflow-level env already exports it, so the value is the same. Refs #193 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cef7644..218fa9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,7 @@ jobs: - name: Set lowercase image name id: image_name - run: echo "value=$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" + run: echo "value=$(echo "${IMAGE_NAME}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" - name: Log in to Container Registry if: github.event_name != 'pull_request'