Skip to content

Commit

Permalink
Using workflow command (#48)
Browse files Browse the repository at this point in the history
* replace check-run api /w workflow command

* fix waitgroup

* fix shell command

* clean up
  • Loading branch information
morphy2k authored Apr 17, 2021
1 parent 595188e commit 03bd48c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 582 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM golang:1.16.3 as build-env

ENV GO111MODULE=on
ENV CGO_ENABLED=0

RUN go get -v github.com/mgechev/revive@v1
Expand Down
3 changes: 0 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ inputs:
path:
description: "Revive path pattern"
required: false
name:
description: "Display name of the check"
required: false
runs:
using: "docker"
image: "Dockerfile"
16 changes: 2 additions & 14 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#!/bin/bash

set -e
set -o pipefail

cd "$GITHUB_WORKSPACE"

if [ ! -z "${INPUT_NAME}" ];
then
export CHECK_NAME=$INPUT_NAME;
else
export CHECK_NAME="revive-action"
fi

LINT_PATH="./..."

if [ ! -z "${INPUT_PATH}" ]; then LINT_PATH=$INPUT_PATH; fi
Expand All @@ -22,10 +16,4 @@ done

if [ ! -z "${INPUT_CONFIG}" ]; then CONFIG="-config=$INPUT_CONFIG"; fi

if [ ! -z "${GITHUB_TOKEN}" ];
then
sh -c "revive $CONFIG $EXCLUDES -formatter ndjson $LINT_PATH | revive-action"
else
echo "Annotations inactive. No GitHub token provided"
sh -c "revive $CONFIG $EXCLUDES -formatter friendly $LINT_PATH"
fi
eval "revive $CONFIG $EXCLUDES -formatter ndjson $LINT_PATH | revive-action"
7 changes: 1 addition & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
module github.com/morphy2k/revive-action

go 1.15

require (
github.com/google/go-github/v33 v33.0.0
golang.org/x/oauth2 v0.0.0-20201203001011-0b49973bad19
)
go 1.16
Loading

0 comments on commit 03bd48c

Please sign in to comment.