mirror of
https://github.com/peter-evans/repository-dispatch.git
synced 2026-07-22 18:47:41 +00:00
17
.eslintrc.json
Normal file
17
.eslintrc.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"commonjs": true,
|
||||||
|
"es6": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"globals": {
|
||||||
|
"Atomics": "readonly",
|
||||||
|
"SharedArrayBuffer": "readonly"
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2018
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
}
|
||||||
|
}
|
||||||
67
.github/workflows/ci.yml
vendored
Normal file
67
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run test
|
||||||
|
- run: npm run package
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: [build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target: [built, committed]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- if: matrix.target == 'built'
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
- name: Repository Dispatch
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
event-type: tests
|
||||||
|
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
||||||
|
|
||||||
|
package:
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
needs: [test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v2
|
||||||
|
with:
|
||||||
|
commit-message: Update distribution
|
||||||
|
committer: GitHub <noreply@github.com>
|
||||||
|
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
||||||
|
title: Update distribution
|
||||||
|
body: |
|
||||||
|
- Updates the distribution for changes on `master`
|
||||||
|
|
||||||
|
Auto-generated by [create-pull-request][1]
|
||||||
|
|
||||||
|
[1]: https://github.com/peter-evans/create-pull-request
|
||||||
|
branch: update-distribution
|
||||||
13
.github/workflows/create-repository-dispatch.yml
vendored
13
.github/workflows/create-repository-dispatch.yml
vendored
@@ -1,13 +0,0 @@
|
|||||||
name: Create Repository Dispatch
|
|
||||||
on: push
|
|
||||||
jobs:
|
|
||||||
createRepositoryDispatch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Repository Dispatch
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
|
||||||
event-type: tests
|
|
||||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
|
||||||
6339
package-lock.json
generated
6339
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -2,9 +2,11 @@
|
|||||||
"name": "repository-dispatch",
|
"name": "repository-dispatch",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Create a repository dispatch event",
|
"description": "Create a repository dispatch event",
|
||||||
"main": "index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"package": "ncc build index.js -o dist"
|
"lint": "eslint src/index.js",
|
||||||
|
"package": "ncc build src/index.js -o dist",
|
||||||
|
"test": "eslint src/index.js && jest --passWithNoTests"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -18,10 +20,12 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/peter-evans/repository-dispatch#readme",
|
"homepage": "https://github.com/peter-evans/repository-dispatch#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.1.1",
|
"@actions/core": "1.2.0",
|
||||||
"@octokit/request": "^5.1.0"
|
"@octokit/request": "5.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@zeit/ncc": "0.22.1"
|
"@zeit/ncc": "0.22.1",
|
||||||
|
"eslint": "6.8.0",
|
||||||
|
"jest": "25.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:base"
|
"config:base"
|
||||||
|
],
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"depTypeList": ["devDependencies"],
|
||||||
|
"automerge": true
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user