From c64159cc430feeeeb648b9c39f8ef772d81197ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Feb 2024 04:26:10 +0000 Subject: [PATCH] =?UTF-8?q?hato-bot=E3=81=AECI=E3=82=92=E5=8F=8D=E6=98=A0?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-test.yml | 4 +++- scripts/pr_format/pr_format/install_pipenv.sh | 24 +++++++++---------- .../pr_test/pr_super_lint/install_pipenv.sh | 4 ++-- scripts/pr_test/pr_super_lint/npm_ci.sh | 4 ++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index a2048dd23..f28747bc6 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -30,13 +30,15 @@ jobs: - name: Install dependencies run: bash "${GITHUB_WORKSPACE}/scripts/pr_test/pr_super_lint/npm_ci.sh" - name: Lint files - uses: super-linter/super-linter/slim@v5.7.2 + uses: super-linter/super-linter/slim@v6.0.0 env: VALIDATE_ALL_CODEBASE: true VALIDATE_SQLFLUFF: false + VALIDATE_CHECKOV: false # TODO: checkovが依存するopenaiのバージョンがアップデートされたら削除 LINTER_RULES_PATH: . FILTER_REGEX_EXCLUDE: ".*assets/.*.txt" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} WORKON_HOME: "" PYTHONPATH: ${{ env.PYTHONPATH }} pr-dotenv-linter: diff --git a/scripts/pr_format/pr_format/install_pipenv.sh b/scripts/pr_format/pr_format/install_pipenv.sh index aa492d646..c235e4a10 100755 --- a/scripts/pr_format/pr_format/install_pipenv.sh +++ b/scripts/pr_format/pr_format/install_pipenv.sh @@ -4,22 +4,22 @@ file_name=Dockerfile package_name=pipenv if [ -f ${file_name} ]; then - PATTERN="${package_name}[^ ]+" - package_name_with_version=$(grep -oE "${PATTERN}" ${file_name}) + PATTERN="${package_name}[^ ]+" + package_name_with_version=$(grep -oE "${PATTERN}" ${file_name}) else - package_name_with_version=${package_name} + package_name_with_version=${package_name} fi pip install "${package_name_with_version}" if [ -f ${file_name} ]; then - new_version="$(pip list --outdated | grep pipenv || true)" - new_version="$(echo -e "${new_version}" | awk '{print $3}')" - if [ -n "${new_version}" ]; then - PATTERN_BEFORE="${package_name}[^ ]+" - PATTERN_AFTER="${package_name}==${new_version}" - sed -i -E "s/${PATTERN_BEFORE}/${PATTERN_AFTER}/g" ${file_name} - pip install "${package_name}==${new_version}" - exit 1 - fi + new_version="$(pip list --outdated | grep pipenv || true)" + new_version="$(echo -e "${new_version}" | awk '{print $3}')" + if [ -n "${new_version}" ]; then + PATTERN_BEFORE="${package_name}[^ ]+" + PATTERN_AFTER="${package_name}==${new_version}" + sed -i -E "s/${PATTERN_BEFORE}/${PATTERN_AFTER}/g" ${file_name} + pip install "${package_name}==${new_version}" + exit 1 + fi fi diff --git a/scripts/pr_test/pr_super_lint/install_pipenv.sh b/scripts/pr_test/pr_super_lint/install_pipenv.sh index 694363117..973179ac6 100755 --- a/scripts/pr_test/pr_super_lint/install_pipenv.sh +++ b/scripts/pr_test/pr_super_lint/install_pipenv.sh @@ -4,9 +4,9 @@ file_name=Dockerfile package_name=pipenv if [ -f ${file_name} ]; then - package_name_v=$(grep -oE "${package_name}[^ ]+" ${file_name}) + package_name_v=$(grep -oE "${package_name}[^ ]+" ${file_name}) else - package_name_v=${package_name} + package_name_v=${package_name} fi pip install "${package_name_v}" diff --git a/scripts/pr_test/pr_super_lint/npm_ci.sh b/scripts/pr_test/pr_super_lint/npm_ci.sh index ddc1fc3ff..557f714e0 100755 --- a/scripts/pr_test/pr_super_lint/npm_ci.sh +++ b/scripts/pr_test/pr_super_lint/npm_ci.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash bash "${GITHUB_WORKSPACE}/scripts/npm_ci.sh" -echo "PYTHONPATH=/github/workspace/:/github/workflow/.venv/lib/python$(echo 'import sys; print(".".join(map(str, sys.version_info[0:2])))' | python)/site-packages" >> "${GITHUB_ENV}" +echo "PYTHONPATH=/github/workspace/:/github/workflow/.venv/lib/python$(echo 'import sys; print(".".join(map(str, sys.version_info[0:2])))' | python)/site-packages" >>"${GITHUB_ENV}" action="$(yq '.jobs.pr-super-lint.steps[-1].uses' .github/workflows/pr-test.yml)" PATH="$(docker run --rm --entrypoint '' "ghcr.io/${action//\/slim@/:slim-}" /bin/sh -c 'echo $PATH')" -echo "PATH=/github/workspace/node_modules/.bin:${PATH}" >> "$GITHUB_ENV" +echo "PATH=/github/workspace/node_modules/.bin:${PATH}" >>"$GITHUB_ENV"