diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3056a82..7bf081b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ruby/setup-ruby@922ebc4c5262cd14e07bb0e1db020984b6c064fe # v1.226.0 with: - ruby-version: 3.0 + ruby-version: 3.4 bundler-cache: true - name: erb_lint with skip install and using bundler uses: ./ diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml new file mode 100644 index 0000000..832e7f0 --- /dev/null +++ b/.github/workflows/depup.yml @@ -0,0 +1,33 @@ +name: depup +on: + schedule: + - cron: "14 14 * * *" # Runs at 14:14 UTC every day + repository_dispatch: + types: [depup] + +jobs: + reviewdog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: haya14busa/action-depup@d6b40096afad49ca676145faaba7190df29a9807 # v1.6.3 + id: depup + with: + file: action.yml + version_name: REVIEWDOG_VERSION + repo: reviewdog/reviewdog + + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}" + commit-message: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}" + body: | + Update reviewdog to [v${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/releases/tag/v${{ steps.depup.outputs.latest }}) + Compare [v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/compare/v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }}) + + This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup). + branch: depup/reviewdog + base: main + labels: "bump:minor" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c18c60b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: release +on: + push: + branches: + - main + tags: + - "v*.*.*" + pull_request: + types: + - labeled + +jobs: + release: + if: github.event.action != 'labeled' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + # Bump version on merging Pull Requests with specific labels. + # (bump:major,bump:minor,bump:patch) + - id: bumpr + if: "!startsWith(github.ref, 'refs/tags/')" + uses: haya14busa/action-bumpr@78ab5a104d20896c9c9122c64221b3aecf1a8cbb # v1.10.0 + + # Update corresponding major and minor tag. + # e.g. Update v1 and v1.2 when releasing v1.2.3 + - uses: haya14busa/action-update-semver@fb48464b2438ae82cc78237be61afb4f461265a1 # v1.2.1 + if: "!steps.bumpr.outputs.skip" + with: + tag: ${{ steps.bumpr.outputs.next_version }} + + # Get tag name. + - id: tag + uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1 + with: + cond: "${{ startsWith(github.ref, 'refs/tags/') }}" + if_true: ${{ github.ref }} + if_false: ${{ steps.bumpr.outputs.next_version }} + + # Create release + - if: "steps.tag.outputs.value != ''" + env: + TAG_NAME: ${{ steps.tag.outputs.value }} + BODY: ${{ steps.bumpr.outputs.message }} + # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${TAG_NAME}" -t "Release ${TAG_NAME/refs\/tags\//}" --notes "${BODY}" + + release-check: + if: github.event.action == 'labeled' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Post bumpr status comment + uses: haya14busa/action-bumpr@78ab5a104d20896c9c9122c64221b3aecf1a8cbb # v1.10.0 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..4dc185e --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,39 @@ +name: reviewdog +on: [pull_request] +jobs: + # Use shellcheck to lint shell scripts + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: shellcheck + uses: reviewdog/action-shellcheck@6e0e63d1750d02d761b3df0f2c5ba9f9ac4a9ed7 # v1.29.0 + with: + github_token: ${{ secrets.github_token }} + + # Use misspell to correct spelling mistakes + misspell: + name: runner / misspell + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: misspell + uses: reviewdog/action-misspell@18ffb61effb93b47e332f185216be7e49592e7e1 # v1.26.1 + with: + github_token: ${{ secrets.github_token }} + locale: "US" + + # Use yamllint to lint yaml files + yamllint: + name: check / yamllint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: yamllint + uses: reviewdog/action-yamllint@1dca3ad811867be18fbe293a9818d715a6c2cd46 # v1.20.0 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_level: any + yamllint_flags: '-d "{extends: default, rules: {truthy: disable}}" .' diff --git a/README.md b/README.md index eda9cab..028fd8e 100644 --- a/README.md +++ b/README.md @@ -93,23 +93,14 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0 with: - ruby-version: 3.0.3 + ruby-version: 3.4.5 - name: erb_lint uses: codeur/action-erblint@5083efd49634e26645a0736681b618ccc3fb7f14 # v2.19.2 with: - erblint_version: 4.8.2 + erblint_version: 0.9.0 reporter: github-pr-review # Default is github-pr-check ``` -## Sponsor - -
-
-
-
-