Skip to content

Commit 64d6d3b

Browse files
committed
Initial Commit
0 parents  commit 64d6d3b

4 files changed

Lines changed: 47 additions & 0 deletions

File tree

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM golang:1.14-alpine as base
2+
RUN apk add --no-cache git
3+
4+
FROM base as builder
5+
RUN go get -u github.com/fmenezes/codeowners/cmd/codeownerslint
6+
7+
FROM alpine:latest
8+
COPY --from=builder /go/bin/codeownerslint /usr/local/bin/codeownerslint
9+
COPY entrypoint.sh /entrypoint.sh
10+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Codeowners Lint docker action
2+
3+
This action lints CODEOWNERS file.
4+
5+
## Inputs
6+
7+
### `dir`
8+
9+
The path to the directory it should run.
10+
11+
## Example usage
12+
13+
uses: fmenezes/codeownerslint-action@v1
14+
with:
15+
dir: './path/to/code/'

action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Codeowners Lint'
2+
description: 'Lints CODEOWNERS files'
3+
inputs:
4+
dir:
5+
description: 'Directory to run'
6+
required: false
7+
default: '.'
8+
token:
9+
description: 'Github token to use'
10+
required: false
11+
runs:
12+
using: 'docker'
13+
image: 'Dockerfile'
14+
args:
15+
- ${{ inputs.dir }}
16+
- ${{ inputs.token }}

entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh -l
2+
3+
DIR=$1
4+
TOKEN=${2:-$GITHUB_TOKEN}
5+
6+
codeownerslint -f '::{{.Severity.Name()}} file={{.Position.FilePath}},line={{.Position.StartLine}},col={{.Position.StartColumn}}::{{.Message}}' -d $DIR -t $TOKEN

0 commit comments

Comments
 (0)