Skip to content

Commit bf05e9d

Browse files
authored
Merge pull request #1 from codeur/add-github-workflows
Add github workflows
2 parents 2ae94a0 + 7a54a65 commit bf05e9d

File tree

8 files changed

+194
-54
lines changed

8 files changed

+194
-54
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1414
- uses: ruby/setup-ruby@922ebc4c5262cd14e07bb0e1db020984b6c064fe # v1.226.0
1515
with:
16-
ruby-version: 3.0
16+
ruby-version: 3.4
1717
bundler-cache: true
1818
- name: erb_lint with skip install and using bundler
1919
uses: ./

.github/workflows/depup.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: depup
2+
on:
3+
schedule:
4+
- cron: "14 14 * * *" # Runs at 14:14 UTC every day
5+
repository_dispatch:
6+
types: [depup]
7+
8+
jobs:
9+
reviewdog:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
- uses: haya14busa/action-depup@d6b40096afad49ca676145faaba7190df29a9807 # v1.6.3
14+
id: depup
15+
with:
16+
file: action.yml
17+
version_name: REVIEWDOG_VERSION
18+
repo: reviewdog/reviewdog
19+
20+
- name: Create Pull Request
21+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
title: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}"
25+
commit-message: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}"
26+
body: |
27+
Update reviewdog to [v${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/releases/tag/v${{ steps.depup.outputs.latest }})
28+
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 }})
29+
30+
This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
31+
branch: depup/reviewdog
32+
base: main
33+
labels: "bump:minor"

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- "v*.*.*"
8+
pull_request:
9+
types:
10+
- labeled
11+
12+
jobs:
13+
release:
14+
if: github.event.action != 'labeled'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
# Bump version on merging Pull Requests with specific labels.
20+
# (bump:major,bump:minor,bump:patch)
21+
- id: bumpr
22+
if: "!startsWith(github.ref, 'refs/tags/')"
23+
uses: haya14busa/action-bumpr@78ab5a104d20896c9c9122c64221b3aecf1a8cbb # v1.10.0
24+
25+
# Update corresponding major and minor tag.
26+
# e.g. Update v1 and v1.2 when releasing v1.2.3
27+
- uses: haya14busa/action-update-semver@fb48464b2438ae82cc78237be61afb4f461265a1 # v1.2.1
28+
if: "!steps.bumpr.outputs.skip"
29+
with:
30+
tag: ${{ steps.bumpr.outputs.next_version }}
31+
32+
# Get tag name.
33+
- id: tag
34+
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
35+
with:
36+
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
37+
if_true: ${{ github.ref }}
38+
if_false: ${{ steps.bumpr.outputs.next_version }}
39+
40+
# Create release
41+
- if: "steps.tag.outputs.value != ''"
42+
env:
43+
TAG_NAME: ${{ steps.tag.outputs.value }}
44+
BODY: ${{ steps.bumpr.outputs.message }}
45+
# This token is provided by Actions, you do not need to create your own token
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
run: |
48+
gh release create "${TAG_NAME}" -t "Release ${TAG_NAME/refs\/tags\//}" --notes "${BODY}"
49+
50+
release-check:
51+
if: github.event.action == 'labeled'
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
55+
- name: Post bumpr status comment
56+
uses: haya14busa/action-bumpr@78ab5a104d20896c9c9122c64221b3aecf1a8cbb # v1.10.0

.github/workflows/reviewdog.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: reviewdog
2+
on: [pull_request]
3+
jobs:
4+
# Use shellcheck to lint shell scripts
5+
shellcheck:
6+
name: runner / shellcheck
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
10+
- name: shellcheck
11+
uses: reviewdog/action-shellcheck@6e0e63d1750d02d761b3df0f2c5ba9f9ac4a9ed7 # v1.29.0
12+
with:
13+
github_token: ${{ secrets.github_token }}
14+
15+
# Use misspell to correct spelling mistakes
16+
misspell:
17+
name: runner / misspell
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
- name: misspell
22+
uses: reviewdog/action-misspell@18ffb61effb93b47e332f185216be7e49592e7e1 # v1.26.1
23+
with:
24+
github_token: ${{ secrets.github_token }}
25+
locale: "US"
26+
27+
# Use yamllint to lint yaml files
28+
yamllint:
29+
name: check / yamllint
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
- name: yamllint
34+
uses: reviewdog/action-yamllint@1dca3ad811867be18fbe293a9818d715a6c2cd46 # v1.20.0
35+
with:
36+
github_token: ${{ secrets.github_token }}
37+
reporter: github-pr-review
38+
fail_level: any
39+
yamllint_flags: '-d "{extends: default, rules: {truthy: disable}}" .'

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,14 @@ jobs:
9393
- name: Set up Ruby
9494
uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
9595
with:
96-
ruby-version: 3.0.3
96+
ruby-version: 3.4.5
9797
- name: erb_lint
9898
uses: codeur/action-erblint@5083efd49634e26645a0736681b618ccc3fb7f14 # v2.19.2
9999
with:
100-
erblint_version: 4.8.2
100+
erblint_version: 0.9.0
101101
reporter: github-pr-review # Default is github-pr-check
102102
```
103103
104-
## Sponsor
105-
106-
<p>
107-
<a href="https://evrone.com/?utm_source=action-erb_lint">
108-
<img src="https://www.mgrachev.com/assets/static/evrone-sponsored-300.png"
109-
alt="Sponsored by Evrone" width="210">
110-
</a>
111-
</p>
112-
113104
## License
114105
115106
[MIT](https://choosealicense.com/licenses/mit)

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
erblint_version:
99
description: 'erb_lint version'
1010
erblint_flags:
11-
description: 'erb_lint flags. (erb_lint --lint-all --format compact --allow-no-files --fail-level F)'
11+
description: 'erb_lint flags. (erb_lint --lint-all --format compact --allow-no-files --fail-level F --show-linter-names)'
1212
default: ''
1313
tool_name:
1414
description: 'Tool name to use for reviewdog reporter'

script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ echo '::group:: Running erb_lint with reviewdog 🐶 ...'
5454
ERBLINT_REPORT_FILE="$TEMP_PATH"/erblint_report
5555

5656
# shellcheck disable=SC2086
57-
${BUNDLE_EXEC}erb_lint --lint-all --format compact --allow-no-files --fail-level F ${INPUT_ERBLINT_FLAGS} > "$ERBLINT_REPORT_FILE"
57+
${BUNDLE_EXEC}erb_lint --lint-all --format compact --allow-no-files --fail-level F --show-linter-names ${INPUT_ERBLINT_FLAGS} > "$ERBLINT_REPORT_FILE"
5858
reviewdog < "$ERBLINT_REPORT_FILE" \
5959
-efm="%f:%l:%c: %m" \
6060
-name="${INPUT_TOOL_NAME}" \

test/using_bundler/Gemfile.lock

Lines changed: 61 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,105 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actionview (7.0.6)
5-
activesupport (= 7.0.6)
4+
actionview (8.0.2.1)
5+
activesupport (= 8.0.2.1)
66
builder (~> 3.1)
7-
erubi (~> 1.4)
8-
rails-dom-testing (~> 2.0)
9-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
10-
activesupport (7.0.6)
11-
concurrent-ruby (~> 1.0, >= 1.0.2)
7+
erubi (~> 1.11)
8+
rails-dom-testing (~> 2.2)
9+
rails-html-sanitizer (~> 1.6)
10+
activesupport (8.0.2.1)
11+
base64
12+
benchmark (>= 0.3)
13+
bigdecimal
14+
concurrent-ruby (~> 1.0, >= 1.3.1)
15+
connection_pool (>= 2.2.5)
16+
drb
1217
i18n (>= 1.6, < 2)
18+
logger (>= 1.4.2)
1319
minitest (>= 5.1)
14-
tzinfo (~> 2.0)
15-
ast (2.4.2)
16-
better_html (2.0.2)
20+
securerandom (>= 0.3)
21+
tzinfo (~> 2.0, >= 2.0.5)
22+
uri (>= 0.13.1)
23+
ast (2.4.3)
24+
base64 (0.3.0)
25+
benchmark (0.4.1)
26+
better_html (2.1.1)
1727
actionview (>= 6.0)
1828
activesupport (>= 6.0)
1929
ast (~> 2.0)
2030
erubi (~> 1.4)
2131
parser (>= 2.4)
2232
smart_properties
23-
builder (3.2.4)
24-
concurrent-ruby (1.2.2)
33+
bigdecimal (3.2.3)
34+
builder (3.3.0)
35+
concurrent-ruby (1.3.5)
36+
connection_pool (2.5.4)
2537
crass (1.0.6)
26-
erb_lint (0.4.0)
38+
drb (2.2.3)
39+
erb_lint (0.9.0)
2740
activesupport
2841
better_html (>= 2.0.1)
2942
parser (>= 2.7.1.4)
3043
rainbow
31-
rubocop
44+
rubocop (>= 1)
3245
smart_properties
33-
erubi (1.12.0)
34-
i18n (1.14.1)
46+
erubi (1.13.1)
47+
i18n (1.14.7)
3548
concurrent-ruby (~> 1.0)
36-
json (2.6.3)
37-
language_server-protocol (3.17.0.3)
38-
loofah (2.21.3)
49+
json (2.13.2)
50+
language_server-protocol (3.17.0.5)
51+
lint_roller (1.1.0)
52+
logger (1.7.0)
53+
loofah (2.24.1)
3954
crass (~> 1.0.2)
4055
nokogiri (>= 1.12.0)
41-
minitest (5.18.1)
42-
nokogiri (1.15.2-arm64-darwin)
56+
minitest (5.25.5)
57+
nokogiri (1.18.9-arm64-darwin)
4358
racc (~> 1.4)
44-
nokogiri (1.15.2-x86_64-linux)
59+
nokogiri (1.18.9-x86_64-linux-gnu)
4560
racc (~> 1.4)
46-
parallel (1.23.0)
47-
parser (3.2.2.3)
61+
parallel (1.27.0)
62+
parser (3.3.9.0)
4863
ast (~> 2.4.1)
4964
racc
50-
racc (1.7.1)
51-
rails-dom-testing (2.1.1)
65+
prism (1.4.0)
66+
racc (1.8.1)
67+
rails-dom-testing (2.3.0)
5268
activesupport (>= 5.0.0)
5369
minitest
5470
nokogiri (>= 1.6)
55-
rails-html-sanitizer (1.6.0)
71+
rails-html-sanitizer (1.6.2)
5672
loofah (~> 2.21)
57-
nokogiri (~> 1.14)
73+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
5874
rainbow (3.1.1)
59-
regexp_parser (2.8.1)
60-
rexml (3.2.5)
61-
rubocop (1.54.0)
75+
regexp_parser (2.11.2)
76+
rubocop (1.80.2)
6277
json (~> 2.3)
63-
language_server-protocol (>= 3.17.0)
78+
language_server-protocol (~> 3.17.0.2)
79+
lint_roller (~> 1.1.0)
6480
parallel (~> 1.10)
65-
parser (>= 3.2.2.3)
81+
parser (>= 3.3.0.2)
6682
rainbow (>= 2.2.2, < 4.0)
67-
regexp_parser (>= 1.8, < 3.0)
68-
rexml (>= 3.2.5, < 4.0)
69-
rubocop-ast (>= 1.28.0, < 2.0)
83+
regexp_parser (>= 2.9.3, < 3.0)
84+
rubocop-ast (>= 1.46.0, < 2.0)
7085
ruby-progressbar (~> 1.7)
71-
unicode-display_width (>= 2.4.0, < 3.0)
72-
rubocop-ast (1.29.0)
73-
parser (>= 3.2.1.0)
86+
unicode-display_width (>= 2.4.0, < 4.0)
87+
rubocop-ast (1.46.0)
88+
parser (>= 3.3.7.2)
89+
prism (~> 1.4)
7490
ruby-progressbar (1.13.0)
91+
securerandom (0.4.1)
7592
smart_properties (1.17.0)
7693
tzinfo (2.0.6)
7794
concurrent-ruby (~> 1.0)
78-
unicode-display_width (2.4.2)
95+
unicode-display_width (3.1.5)
96+
unicode-emoji (~> 4.0, >= 4.0.4)
97+
unicode-emoji (4.0.4)
98+
uri (1.0.3)
7999

80100
PLATFORMS
81101
arm64-darwin-20
102+
arm64-darwin-24
82103
x86_64-linux
83104

84105
DEPENDENCIES

0 commit comments

Comments
 (0)