diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml deleted file mode 100644 index 68a8897..0000000 --- a/.github/workflows/depup.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: depup -on: - schedule: - - cron: "14 14 * * *" # Runs at 14:14 UTC every day - repository_dispatch: - types: [depup] - workflow_dispatch: - -jobs: - reviewdog: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: reviewdog/action-depup/with-pr@v1 - with: - file: action.yml - version_name: reviewdog_version - repo: reviewdog/reviewdog - labels: "bump:minor" diff --git a/README.md b/README.md index 646648d..6b9380a 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,19 @@ -# action-composite-template +# action-shfmt - -[![Test](https://github.com/reviewdog/action-composite-template/workflows/Test/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3ATest) -[![reviewdog](https://github.com/reviewdog/action-composite-template/workflows/reviewdog/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3Areviewdog) -[![depup](https://github.com/reviewdog/action-composite-template/workflows/depup/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3Adepup) -[![release](https://github.com/reviewdog/action-composite-template/workflows/release/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3Arelease) -[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-composite-template?logo=github&sort=semver)](https://github.com/reviewdog/action-composite-template/releases) +[![Test](https://github.com/reviewdog/action-shfmt/workflows/Test/badge.svg)](https://github.com/reviewdog/action-shfmt/actions?query=workflow%3ATest) +[![reviewdog](https://github.com/reviewdog/action-shfmt/workflows/reviewdog/badge.svg)](https://github.com/reviewdog/action-shfmt/actions?query=workflow%3Areviewdog) +[![depup](https://github.com/reviewdog/action-shfmt/workflows/depup/badge.svg)](https://github.com/reviewdog/action-shfmt/actions?query=workflow%3Adepup) +[![release](https://github.com/reviewdog/action-shfmt/workflows/release/badge.svg)](https://github.com/reviewdog/action-shfmt/actions?query=workflow%3Arelease) +[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-shfmt?logo=github&sort=semver)](https://github.com/reviewdog/action-shfmt/releases) [![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr) -![github-pr-review demo](https://user-images.githubusercontent.com/3797062/73162963-4b8e2b00-4132-11ea-9a3f-f9c6f624c79f.png) -![github-pr-check demo](https://user-images.githubusercontent.com/3797062/73163032-70829e00-4132-11ea-8481-f213a37db354.png) +![demo](https://user-images.githubusercontent.com/3797062/134041779-b016a9cc-efba-4191-a254-656a495cfac8.png) -This is a template repository for -[reviewdog](https://github.com/reviewdog/reviewdog) action with release -automation based on [action composition](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action). -Click `Use this template` button to create your reviewdog action :dog:! +Run [shfmt](https://github.com/mvdan/sh) with [reviewdog](https://github.com/reviewdog/reviewdog) and post GitHub suggestion comments on Pull Requests. -If you want to create your own reviewdog action from scratch without using this -template, please check and copy release automation flow. -It's important to manage release workflow and sync reviewdog version for all -reviewdog actions. - -This repo contains a sample action to run [misspell](https://github.com/client9/misspell). ## Input - ```yaml inputs: github_token: @@ -38,9 +26,6 @@ inputs: level: description: 'Report level for reviewdog [info,warning,error]' default: 'error' - reporter: - description: 'Reporter of reviewdog command [github-check,github-pr-review,github-pr-check].' - default: 'github-check' filter_mode: description: | Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. @@ -54,63 +39,22 @@ inputs: reviewdog_flags: description: 'Additional reviewdog flags' default: '' - ### Flags for ### - locale: - description: '-locale flag of misspell. (US/UK)' - default: '' + ### Flags for shfmt ### + shfmt_flags: + description: 'flags for shfmt' + default: '-i 2 -ci' ``` ## Usage - ```yaml name: reviewdog on: [pull_request] jobs: - # TODO: change `linter_name`. - linter_name: - name: runner / + shfmt: + name: runner / shfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: reviewdog/action-composite-template@v1 - with: - github_token: ${{ secrets.github_token }} - # Change reviewdog reporter if you need [github-check,github-pr-review,github-pr-check]. - reporter: github-pr-review - # Change reporter level if you need. - # GitHub Status Check won't become failure with warning. - level: warning + - uses: reviewdog/action-shfmt@v1 ``` - -## Development - -### Release - -#### [haya14busa/action-bumpr](https://github.com/haya14busa/action-bumpr) -You can bump version on merging Pull Requests with specific labels (bump:major,bump:minor,bump:patch). -Pushing tag manually by yourself also work. - -#### [haya14busa/action-update-semver](https://github.com/haya14busa/action-update-semver) - -This action updates major/minor release tags on a tag push. e.g. Update v1 and v1.2 tag when released v1.2.3. -ref: https://help.github.com/en/articles/about-actions#versioning-your-action - -### Lint - reviewdog integration - -This reviewdog action template itself is integrated with reviewdog to run lints -which is useful for Docker container based actions. - -![reviewdog integration](https://user-images.githubusercontent.com/3797062/72735107-7fbb9600-3bde-11ea-8087-12af76e7ee6f.png) - -Supported linters: - -- [reviewdog/action-shellcheck](https://github.com/reviewdog/action-shellcheck) -- [reviewdog/action-hadolint](https://github.com/reviewdog/action-hadolint) -- [reviewdog/action-misspell](https://github.com/reviewdog/action-misspell) - -### Dependencies Update Automation -This repository uses [reviewdog/action-depup](https://github.com/reviewdog/action-depup) to update -reviewdog version. - -![reviewdog depup demo](https://user-images.githubusercontent.com/3797062/73154254-170e7500-411a-11ea-8211-912e9de7c936.png)