Skip to content

Commit

Permalink
feat: setup metadata for javascript action and remove docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed Aug 16, 2020
1 parent 0b5cd83 commit ca4e74b
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 90 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
# Specifying both of these with a branch filter will run your workflow twice
# on each build and is only done here for testing ensuring the Action wroks.
# on each build and is only done here for testing ensuring the Action works.
- push
- pull_request
# Instead, you probably want to use either
Expand All @@ -25,14 +25,14 @@ jobs:
run: |
mkdir -p ./reports/junit/
cp ./example/junit.xml ./reports/junit/
# Please replace "master" with the latest git tag
- uses: check-run-reporter/action@master
# Please use the latest git tag here.
- uses: check-run-reporter/action@typescript-action
if: ${{ always() }}
env:
# This event name is more complex than you probably want. Since we're
with:
# This label is more complex than you probably want. Since we're
# running this workflow for both push and pull_request events to test
# the action itself, we're effectively running the workflwo twice for
# each PR Commit and we need to differentiate in the UI.
CHECK_RUN_REPORTER_LABEL: 'Unit Tests (${{ github.event_name }})'
CHECK_RUN_REPORTER_REPORT: 'reports/junit/**/*.xml'
CHECK_RUN_REPORTER_TOKEN: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
label: 'Unit Tests (${{ github.event_name }})'
report: 'reports/junit/**/*.xml'
token: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

33 changes: 31 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ description: |
branding:
icon: 'check'
color: 'orange'
inputs:
label:
default: $GITHUB_ACTION
description:
Label that should appear in the GitHub check. Defaults to the step's name.
required: false
report:
description: Path or glob to the job's report files.
required: true
root:
default: $(PWD)
description:
Defaults to `$(pwd)`. If you run your tests via a `uses` step, the default
should be fine, but if you run your tests via a `run` step, you may need
to speriment a bit to determine what working directory was set during your
tests.
required: false
token:
description:
Repo token to authenticate the upload. You can get your tokens from
[https://www.check-run-reporter.com/repos](https://www.check-run-reporter.com/repos).
required: true
url:
default: 'https://api.check-run-reporter.com/api/v1/submissions'
description:
Mostly here for future use, this let's us specify an alternate endpoint
for testing new features. Unless specifically told to do so by support,
please don't change this value.
required: false
runs:
using: 'docker'
image: 'Dockerfile'
using: 'node12'
main: 'index.js'
67 changes: 0 additions & 67 deletions entrypoint

This file was deleted.

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('It works!');
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "check-run-reporter-action",
"version": "0.0.0-development",
"description": "A GitHub action for uploading structured test reports to > [check-run-reporter.com](https://www.check-run-reporter.com).",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/check-run-reporter/action.git"
},
"keywords": [],
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/check-run-reporter/action/issues"
},
"homepage": "https://www.check-run-reporter.com"
}

0 comments on commit ca4e74b

Please sign in to comment.