From 3409f3e9a64204e424c5fa7bbaa434743f296427 Mon Sep 17 00:00:00 2001 From: Lucky3028 Date: Thu, 9 Feb 2023 13:29:05 +0900 Subject: [PATCH 1/3] =?UTF-8?q?ci:=20GitHub=E3=81=AE=E3=83=88=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=83=B3=E3=82=92inputs=E3=81=8B=E3=82=89=E5=8F=97?= =?UTF-8?q?=E3=81=91=E5=8F=96=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/run-reviewdog/action.yml | 5 ++++- .github/workflows/build_and_deploy.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-reviewdog/action.yml b/.github/actions/run-reviewdog/action.yml index 0637af31c8..76ddb3872d 100644 --- a/.github/actions/run-reviewdog/action.yml +++ b/.github/actions/run-reviewdog/action.yml @@ -6,6 +6,9 @@ inputs: description: The reviewdog's name. required: true default: reviewdog + github-token: + description: The GitHub Actions's token + required: true runs: using: composite steps: @@ -37,5 +40,5 @@ runs: -level="warning" <"${TMPFILE}" env: REVIEWDOG_NAME: ${{ inputs.reviewdog-name }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} shell: bash diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 1c2159a6ce..84283d0034 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -109,6 +109,7 @@ jobs: if: ${{ (github.event_name == 'pull_request') && failure() }} with: reviewdog-name: scalafmt + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Check lint with Scalafix on push if: ${{ (github.event_name == 'push')}} @@ -121,6 +122,7 @@ jobs: if: ${{ (github.event_name == 'pull_request') && failure() }} with: reviewdog-name: scalafix + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Test and build artifact run: sbt assembly From b1d95756356aedd8a4eb15f780660c9a822d2b74 Mon Sep 17 00:00:00 2001 From: Lucky3028 Date: Thu, 9 Feb 2023 13:30:40 +0900 Subject: [PATCH 2/3] =?UTF-8?q?ci:=20=E3=82=BB=E3=82=AD=E3=83=A5=E3=83=AA?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=81=AE=E3=81=9F=E3=82=81=E5=A4=89=E6=95=B0?= =?UTF-8?q?=E3=82=92=E3=82=AF=E3=82=A9=E3=83=BC=E3=83=86=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=81=A7=E5=9B=B2=E3=82=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/run-reviewdog/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/run-reviewdog/action.yml b/.github/actions/run-reviewdog/action.yml index 76ddb3872d..6671010666 100644 --- a/.github/actions/run-reviewdog/action.yml +++ b/.github/actions/run-reviewdog/action.yml @@ -18,8 +18,8 @@ runs: REVIEWDOG_VERSION="0.14.1" FILE_NAME="reviewdog_${REVIEWDOG_VERSION}_Linux_x86_64.tar.gz" wget -q https://github.com/reviewdog/reviewdog/releases/download/v${REVIEWDOG_VERSION}/${FILE_NAME} - tar -zxvf ${FILE_NAME} - rm -rf ${FILE_NAME} + tar -zxvf "${FILE_NAME}" + rm -rf "${FILE_NAME}" chmod +x ./reviewdog sudo mv reviewdog /usr/local/bin fi @@ -28,7 +28,7 @@ runs: - name: Run reviewdog run: | export REVIEWDOG_GITHUB_API_TOKEN="${GITHUB_TOKEN}" - TMPFILE=$(mktemp) + TMPFILE="$(mktemp)" git diff > "${TMPFILE}" reviewdog \ -name="${REVIEWDOG_NAME}" \ From ee5b103a691685b46ec081d79252bd5181cc17f0 Mon Sep 17 00:00:00 2001 From: Lucky3028 Date: Thu, 9 Feb 2023 13:31:31 +0900 Subject: [PATCH 3/3] ci: remove "export" --- .github/actions/run-reviewdog/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-reviewdog/action.yml b/.github/actions/run-reviewdog/action.yml index 6671010666..c1726fb426 100644 --- a/.github/actions/run-reviewdog/action.yml +++ b/.github/actions/run-reviewdog/action.yml @@ -27,7 +27,7 @@ runs: shell: bash - name: Run reviewdog run: | - export REVIEWDOG_GITHUB_API_TOKEN="${GITHUB_TOKEN}" + REVIEWDOG_GITHUB_API_TOKEN="${GITHUB_TOKEN}" TMPFILE="$(mktemp)" git diff > "${TMPFILE}" reviewdog \