Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6564ec35db | |||
| 6df951a495 | |||
| 56143fc03d |
@@ -1,19 +0,0 @@
|
|||||||
on:
|
|
||||||
push: {branches: master}
|
|
||||||
pull_request: {branches: master}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ci:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v1
|
|
||||||
with: {node-version: 13.x}
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
|
|
||||||
restore-keys: ${{runner.os}}-npm-
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run style:check
|
|
||||||
- run: npm test
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
on:
|
|
||||||
push: {branches: master}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
integration:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- id: output-set
|
|
||||||
uses: actions/github-script@master
|
|
||||||
with:
|
|
||||||
script: return core.getInput('input-value')
|
|
||||||
result-encoding: string
|
|
||||||
input-value: output
|
|
||||||
- run: |
|
|
||||||
if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: master
|
|
||||||
types: [opened, synchronize]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pull-request-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: ./
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
// Get the existing comments.
|
|
||||||
const {data: comments} = await github.issues.listComments({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.payload.number,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Find any comment already made by the bot.
|
|
||||||
const botComment = comments.find(comment => comment.user.id === 41898282)
|
|
||||||
const commentBody = "Hello from actions/github-script! (${{ github.sha }})"
|
|
||||||
|
|
||||||
if (botComment) {
|
|
||||||
await github.issues.updateComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
comment_id: botComment.id,
|
|
||||||
body: commentBody
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
await github.issues.createComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.payload.number,
|
|
||||||
body: commentBody
|
|
||||||
})
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user