Skip to content

Commit fa87f3f

Browse files
committed
Add github workflows like for action-brakeman
1 parent 2ae94a0 commit fa87f3f

5 files changed

Lines changed: 134 additions & 14 deletions

File tree

.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: master
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)

test/using_bundler/Gemfile.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ GEM
3838
loofah (2.21.3)
3939
crass (~> 1.0.2)
4040
nokogiri (>= 1.12.0)
41+
mini_portile2 (2.8.9)
4142
minitest (5.18.1)
42-
nokogiri (1.15.2-arm64-darwin)
43-
racc (~> 1.4)
44-
nokogiri (1.15.2-x86_64-linux)
43+
nokogiri (1.15.2)
44+
mini_portile2 (~> 2.8.2)
4545
racc (~> 1.4)
4646
parallel (1.23.0)
4747
parser (3.2.2.3)
@@ -79,6 +79,7 @@ GEM
7979

8080
PLATFORMS
8181
arm64-darwin-20
82+
arm64-darwin-24
8283
x86_64-linux
8384

8485
DEPENDENCIES

0 commit comments

Comments
 (0)