summaryrefslogtreecommitdiffstats
path: root/.github/workflows/review.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/review.yml')
-rw-r--r--.github/workflows/review.yml72
1 files changed, 36 insertions, 36 deletions
diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml
index c7b038135..30b09ec06 100644
--- a/.github/workflows/review.yml
+++ b/.github/workflows/review.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
actionlint: ${{ steps.actionlint.outputs.run }}
- clangformat: ${{ steps.clangformat.outputs.run }}
+ # clangformat: ${{ steps.clangformat.outputs.run }}
flake8: ${{ steps.flake8.outputs.run }}
golangci-lint: ${{ steps.golangci-lint.outputs.run }}
hadolint: ${{ steps.hadolint.outputs.run }}
@@ -65,11 +65,11 @@ jobs:
run: |
if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/golangci-lint') }}" = "true" ]; then
echo "run=true" >> "${GITHUB_OUTPUT}"
- elif git diff --name-only origin/${{ github.base_ref }} HEAD -- | grep -Eq '.*\.go' ; then
- echo "run=true" >> $GITHUB_OUTPUT
+ elif git diff --name-only origin/"${{ github.base_ref }}" HEAD -- | grep -Eq '.*\.go'; then
+ echo "run=true" >> "${GITHUB_OUTPUT}"
echo 'Go code has changed, need to run golangci-lint.'
else
- echo "run=false" >> $GITHUB_OUTPUT
+ echo "run=false" >> "${GITHUB_OUTPUT}"
fi
- name: Check files for hadolint
id: hadolint
@@ -122,38 +122,38 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
- clang-format:
- name: clang-format
- needs: prep-review
- if: needs.prep-review.outputs.clangformat == 'true'
- runs-on: ubuntu-latest
- steps:
- - name: Git clone repository
- uses: actions/checkout@v4
- with:
- submodules: false
- fetch-depth: 0
- - name: Check for label
- id: label
- run: |
- if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/clang-format') }}" = "true" ]; then
- echo 'check-all=true' >> "${GITHUB_OUTPUT}"
- else
- echo 'check-all=false' >> "${GITHUB_OUTPUT}"
- fi
- - name: Run clang-format
- run: |
- if [ "${{ steps.label.outputs.check-all }}" == 'true' ]; then
- find . -regex '.*\.\(c\|cpp\|cxx\|h\|hpp\|hxx\)$' -exec clang-format -i --style=file '{}' \;
- else
- git diff --name-only origin/${{ github.base_ref }} HEAD | grep -E '\.cpp$|\.cxx$|\.c$|\.hpp$|\.hxx$|\.h$' | \
- xargs -n 1 -r clang-format -i --style=file
- fi
- git status --porcelain=v1 > /tmp/porcelain
- if [ -s /tmp/porcelain ]; then
- cat /tmp/porcelain
- exit 1
- fi
+# clang-format:
+# name: clang-format
+# needs: prep-review
+# if: needs.prep-review.outputs.clangformat == 'true'
+# runs-on: ubuntu-latest
+# steps:
+# - name: Git clone repository
+# uses: actions/checkout@v4
+# with:
+# submodules: false
+# fetch-depth: 0
+# - name: Check for label
+# id: label
+# run: |
+# if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/clang-format') }}" = "true" ]; then
+# echo 'check-all=true' >> "${GITHUB_OUTPUT}"
+# else
+# echo 'check-all=false' >> "${GITHUB_OUTPUT}"
+# fi
+# - name: Run clang-format
+# run: |
+# if [ "${{ steps.label.outputs.check-all }}" == 'true' ]; then
+# find . -regex '.*\.\(c\|cpp\|cxx\|h\|hpp\|hxx\)$' -exec clang-format -i --style=file '{}' \;
+# else
+# git diff --name-only origin/${{ github.base_ref }} HEAD | grep -E '\.cpp$|\.cxx$|\.c$|\.hpp$|\.hxx$|\.h$' | \
+# xargs -n 1 -r clang-format -i --style=file
+# fi
+# git status --porcelain=v1 > /tmp/porcelain
+# if [ -s /tmp/porcelain ]; then
+# cat /tmp/porcelain
+# exit 1
+# fi
flake8:
name: flake8