Skip to content

Commit

Permalink
Merge pull request #64 from reviewdog/do-not-use-latest-staticcheck
Browse files Browse the repository at this point in the history
use fixed staticcheck version
  • Loading branch information
shmokmt authored Oct 27, 2024
2 parents ab25b11 + 2585b5c commit 09d3c09
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/depup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,29 @@ jobs:
branch: depup/reviewdog
base: master
labels: "bump:minor"

staticcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: haya14busa/action-depup@v1
id: depup
with:
file: script.sh
version_name: STATICCHECK_VERSION
repo: dominikh/go-tools

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "chore(deps): update staticcheck to ${{ steps.depup.outputs.latest }}"
commit-message: "chore(deps): update staticcheck to ${{ steps.depup.outputs.latest }}"
body: |
Update staticcheck to [v${{ steps.depup.outputs.latest }}](https://github.com/dominikh/go-tools/releases/tag/${{ steps.depup.outputs.latest }})
Compare [v${{ steps.depup.outputs.current }}...${{ steps.depup.outputs.latest }}](https://github.com/gominikh/go-tools/compare/${{ steps.depup.outputs.current }}...${{ steps.depup.outputs.latest }})
This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
branch: depup/staticcheck
base: master
labels: "bump:minor"
8 changes: 5 additions & 3 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ TEMP_PATH="$(mktemp -d)"
PATH="${TEMP_PATH}:$PATH"
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

STATICCHECK_VERSION="2024.1.1"
echo '::group:: Installing staticcheck ... https://staticcheck.io'
curl -sfL "https://github.com/dominikh/go-tools/releases/latest/download/staticcheck_linux_amd64.tar.gz" | tar -xvz -C "${TEMP_PATH}" --strip-components=1
curl -sfL "https://github.com/dominikh/go-tools/releases/download/${STATICCHECK_VERSION}/staticcheck_linux_amd64.tar.gz" | tar -xvz -C "${TEMP_PATH}" --strip-components=1
staticcheck --version
echo '::endgroup::'


echo '::group:: Running staticcheck with reviewdog 🐶 ...'
staticcheck ${INPUT_STATICCHECK_FLAGS} -f=json ${INPUT_TARGET:-.} \
staticcheck "${INPUT_STATICCHECK_FLAGS}" -f=json "${INPUT_TARGET:-.}" \
| jq -f "${GITHUB_ACTION_PATH}/to-rdjsonl.jq" -c | \
reviewdog \
-f="rdjsonl" \
Expand All @@ -22,7 +24,7 @@ staticcheck ${INPUT_STATICCHECK_FLAGS} -f=json ${INPUT_TARGET:-.} \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}
"${INPUT_REVIEWDOG_FLAGS}"

exit_code=$?
echo '::endgroup::'
Expand Down

0 comments on commit 09d3c09

Please sign in to comment.