From 94e390ebc9ae44b3c4485532fdf3531e3d8324ba Mon Sep 17 00:00:00 2001 From: Surya Date: Wed, 11 Feb 2026 12:03:59 +0530 Subject: [PATCH 1/4] fix: if clause in pre-commit action --- pre-commit/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pre-commit/action.yaml b/pre-commit/action.yaml index a6f2cb1..c77863e 100644 --- a/pre-commit/action.yaml +++ b/pre-commit/action.yaml @@ -55,14 +55,14 @@ runs: - name: Step up Cppcheck cache id: cache-cppcheck - if: ${{ inputs.use_cppcheck == "true" && inputs.use_cache == "true" }} + if: inputs.use_cppcheck == "true" && inputs.use_cache == "true" uses: actions/cache@v4 with: path: ${{ github.workspace }}/.cache/cppcheck key: cppcheck-${{ runner.os }}-v2.13.0 - name: Set up Cppcheck - if: ${{ inputs.use_cppcheck == "true" && steps.cache-cppcheck.outputs.cache-hit != "true" }} + if: inputs.use_cppcheck == "true" && steps.cache-cppcheck.outputs.cache-hit != "true" shell: bash run: | mkdir -p ${{ github.workspace }}/.cache/cppcheck @@ -80,7 +80,7 @@ runs: - name: Add Cppcheck to Path - if: ${{ inputs.use_cppcheck == "true" }} + if: inputs.use_cppcheck == "true" shell: bash run: | if [ -d "${{ github.workspace }}/.cache/cppcheck/usr/bin" ]; then @@ -89,7 +89,7 @@ runs: - name: Set up pre-commit cache id: cache-pre-commit - if: ${{ inputs.use_cache == "true" }} + if: inputs.use_cache == "true" uses: actions/cache@v4 with: path: ${{ github.workspace }}/.cache/pre-commit From 65a81b0af8022ffe2d6fe488a2580e4bde0f1abd Mon Sep 17 00:00:00 2001 From: Surya Date: Wed, 11 Feb 2026 12:11:15 +0530 Subject: [PATCH 2/4] fix: pre-commit action --- pre-commit/action.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pre-commit/action.yaml b/pre-commit/action.yaml index c77863e..e48f5d7 100644 --- a/pre-commit/action.yaml +++ b/pre-commit/action.yaml @@ -55,14 +55,14 @@ runs: - name: Step up Cppcheck cache id: cache-cppcheck - if: inputs.use_cppcheck == "true" && inputs.use_cache == "true" + if: inputs.use_cppcheck == 'true' && inputs.use_cache == 'true' uses: actions/cache@v4 with: path: ${{ github.workspace }}/.cache/cppcheck key: cppcheck-${{ runner.os }}-v2.13.0 - name: Set up Cppcheck - if: inputs.use_cppcheck == "true" && steps.cache-cppcheck.outputs.cache-hit != "true" + if: inputs.use_cppcheck == 'true' && steps.cache-cppcheck.outputs.cache-hit != 'true' shell: bash run: | mkdir -p ${{ github.workspace }}/.cache/cppcheck @@ -80,7 +80,7 @@ runs: - name: Add Cppcheck to Path - if: inputs.use_cppcheck == "true" + if: inputs.use_cppcheck == 'true' shell: bash run: | if [ -d "${{ github.workspace }}/.cache/cppcheck/usr/bin" ]; then @@ -89,11 +89,11 @@ runs: - name: Set up pre-commit cache id: cache-pre-commit - if: inputs.use_cache == "true" + if: inputs.use_cache == 'true' uses: actions/cache@v4 with: path: ${{ github.workspace }}/.cache/pre-commit - key: pre-commit-${{ runner.os }}-${{ hashFiles(".pre-commit-config.yaml") }} + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} restore-keys: | pre-commit-${{ runner.os }}- From 9eae366f892d6bd9b64eef33b6f729792c6d7307 Mon Sep 17 00:00:00 2001 From: Surya Date: Wed, 11 Feb 2026 12:31:32 +0530 Subject: [PATCH 3/4] fix: pre-commit action --- pre-commit/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-commit/action.yaml b/pre-commit/action.yaml index e48f5d7..899d11c 100644 --- a/pre-commit/action.yaml +++ b/pre-commit/action.yaml @@ -69,14 +69,14 @@ runs: sudo apt-get -qq update # Set up temp directory - temp_dir=$(mktemp -d) && cd temp_dir + temp_dir=$(mktemp -d) && cd "$temp_dir" # Download and extract Cppcheck sudo apt-get download -qq -y cppcheck dpkg-deb -x cppcheck_*.deb ${{ github.workspace }}/.cache/cppcheck # Cleanup - cd ${{ github.workspace }} && rm -rf temp_dir + cd ${{ github.workspace }} && rm -rf "$temp_dir" - name: Add Cppcheck to Path From 59f0a5010c70ca41adfc74663bb76466bc49dcfb Mon Sep 17 00:00:00 2001 From: Surya Date: Wed, 11 Feb 2026 15:32:48 +0530 Subject: [PATCH 4/4] fix: pre-commit action --- pre-commit/action.yaml | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/pre-commit/action.yaml b/pre-commit/action.yaml index 899d11c..835fb62 100644 --- a/pre-commit/action.yaml +++ b/pre-commit/action.yaml @@ -53,39 +53,12 @@ runs: cache: "pip" cache-dependency-path: ".pre-commit-config.yaml" - - name: Step up Cppcheck cache - id: cache-cppcheck - if: inputs.use_cppcheck == 'true' && inputs.use_cache == 'true' - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}/.cache/cppcheck - key: cppcheck-${{ runner.os }}-v2.13.0 - - name: Set up Cppcheck - if: inputs.use_cppcheck == 'true' && steps.cache-cppcheck.outputs.cache-hit != 'true' - shell: bash - run: | - mkdir -p ${{ github.workspace }}/.cache/cppcheck - sudo apt-get -qq update - - # Set up temp directory - temp_dir=$(mktemp -d) && cd "$temp_dir" - - # Download and extract Cppcheck - sudo apt-get download -qq -y cppcheck - dpkg-deb -x cppcheck_*.deb ${{ github.workspace }}/.cache/cppcheck - - # Cleanup - cd ${{ github.workspace }} && rm -rf "$temp_dir" - - - - name: Add Cppcheck to Path if: inputs.use_cppcheck == 'true' shell: bash run: | - if [ -d "${{ github.workspace }}/.cache/cppcheck/usr/bin" ]; then - echo "${{ github.workspace }}/.cache/cppcheck/usr/bin" >> $GITHUB_PATH - fi + sudo apt-get -qq update + sudo apt-get install -qq -y cppcheck - name: Set up pre-commit cache id: cache-pre-commit