Skip to content

Commit

Permalink
update to yml (#6)
Browse files Browse the repository at this point in the history
* Create action.yml

* Update Dockerfile

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update logic.js

* Update logic.js

* Update README.md
  • Loading branch information
larshp committed Sep 2, 2019
1 parent 4ad64aa commit 8f53a28
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 34 deletions.
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
FROM node:lts

LABEL "version"="0.1.0"
LABEL "repository"="https://github.com/abaplint/actions-abaplint"

LABEL "com.github.actions.name"="abaplint"
LABEL "com.github.actions.description"="Lint ABAP code"
LABEL "com.github.actions.icon"="cloud-drizzle"
LABEL "com.github.actions.color"="blue"

ADD entrypoint.sh /entrypoint.sh
ADD logic.js /logic.js
ENTRYPOINT ["/entrypoint.sh"]
27 changes: 4 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,10 @@ abaplint GitHub action
### Usage

```
workflow "workflow, on pull_request" {
on = "pull_request"
resolves = ["action, on pull_request"]
}
action "action, on pull_request" {
uses = "abaplint/actions-abaplint@master"
secrets = ["GITHUB_TOKEN"]
}
```

Or on push,

```
workflow "Workflow, On Push" {
on = "push"
resolves = ["abaplint/actions-abaplint@master"]
}
action "abaplint/actions-abaplint@master" {
uses = "abaplint/actions-abaplint@master"
secrets = ["GITHUB_TOKEN"]
}
- name: abaplint
uses: abaplint/actions-abaplint@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

The GITHUB_TOKEN is used to push back the results via the [Checks API](https://developer.github.com/v3/checks/)
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: abaplint
description: Lint ABAP code
author: abaplint
branding:
color: blue
icon: cloud-drizzle
runs:
using: 'docker'
image: 'Dockerfile'
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh
npm install abaplint -g
abaplint --version
abaplint "src/**/*.*" -f total --outformat json --outfile /result.json
abaplint -f total --outformat json --outfile /result.json
cd /
npm install @octokit/rest@16.10.0 --loglevel=error
node /logic.js
2 changes: 1 addition & 1 deletion logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function buildSummary() {
async function run() {
const annotations = buildAnnotations();
const summary = buildSummary();

octokit.authenticate({
type: 'token',
token: process.env.GITHUB_TOKEN,
Expand Down

0 comments on commit 8f53a28

Please sign in to comment.