diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index e94911b..fdeb4b6 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -21,8 +21,15 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Prepare + run: | + container=${{ container }} + RELEASE=${container##*:} + echo "RELEASE=${container##*:}" >> $GITHUB_ENV + clang-format --version | grep -F " version ${RELEASE}" + - name: Format source files - run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i + run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${{ env.RELEASE }} -i - name: Check for differences id: assert @@ -58,6 +65,6 @@ jobs: in your repo, commit, and push. run: | echo "${PREAMBLE}" - clang-format-${CLANG_VERSION} --version + clang-format-${{ env.RELEASE }} --version echo "${SUGGESTION}" exit 1