diff --git a/.github/actions/run-reviewdog/action.yml b/.github/actions/run-reviewdog/action.yml index 0637af31c8..c1726fb426 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: @@ -15,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 @@ -24,8 +27,8 @@ runs: shell: bash - name: Run reviewdog run: | - export REVIEWDOG_GITHUB_API_TOKEN="${GITHUB_TOKEN}" - TMPFILE=$(mktemp) + REVIEWDOG_GITHUB_API_TOKEN="${GITHUB_TOKEN}" + TMPFILE="$(mktemp)" git diff > "${TMPFILE}" reviewdog \ -name="${REVIEWDOG_NAME}" \ @@ -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