Skip to content

Commit

Permalink
Update action for new actions syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Feb 4, 2020
1 parent c3d052b commit ea6de76
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM ruby:2.6
FROM ruby:2.7

LABEL com.github.actions.name="StandardRB checks"
LABEL com.github.actions.name="StandardRB"
LABEL com.github.actions.description="Lint your Ruby code in parallel to your builds with StandardRB"
LABEL com.github.actions.icon="code"
LABEL com.github.actions.color="red"

LABEL maintainer="Bryce Mecum <[email protected]>"

COPY lib /action/lib
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,40 @@ Based almost entirely off the [Rubucop Action](https://github.com/gimenete/ruboc

![](docs/images/screenshot.png)

## Example usage

Here's an example running a build matrix and StandardRB:

```yml
name: CI

on: [push]

jobs:
Build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.5', '2.6', '2.7' ]
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{matrix.ruby}}
uses: actions/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
- name: Build and test with Rake
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rake
StandardRB:
runs-on: ubuntu-latest
steps:
- name: standardrb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: amoeba/standardrb-action@v2
```
## Contributing
Expand Down
19 changes: 19 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
name: 'StandardRB'
author: 'https://github.com/amoeba'
description: 'Lint your Ruby code in parallel to your builds with StandardRB'
outputs:
title:
description: 'The title of the check'
summary:
description: 'The description of the check'
annotations:
description: 'A reference to the code failing the check'
env:
'GITHUB_TOKEN': 'Automatically set by Actions'
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'code'
color: 'red'

0 comments on commit ea6de76

Please sign in to comment.