mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 20:41:15 +00:00
ci: test workflow_run
This commit is contained in:
parent
56ac27318d
commit
58da41abb9
3 changed files with 37 additions and 18 deletions
17
.github/workflows/comment_on_push.yml
vendored
17
.github/workflows/comment_on_push.yml
vendored
|
|
@ -1,17 +0,0 @@
|
|||
name: Comment on Push
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: jwalton/gh-find-current-pr@v1
|
||||
id: finder
|
||||
- uses: ./
|
||||
with:
|
||||
number: ${{ steps.finder.outputs.pr }}
|
||||
message: |
|
||||
Test ${{ github.sha }} is successfully ended.
|
||||
This is message from push.
|
||||
28
.github/workflows/comment_on_workflow_run.yml
vendored
Normal file
28
.github/workflows/comment_on_workflow_run.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Comment on PR
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- "Test"
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
exam:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: on artifact
|
||||
id: artifact
|
||||
uses: marocchino/on_artifact@v1
|
||||
with:
|
||||
name: all
|
||||
- uses: ./
|
||||
with:
|
||||
header: All
|
||||
number: ${{ steps.artifact.outputs.number }}
|
||||
message: |
|
||||
```
|
||||
${{ steps.artifact.outputs.all_result }}
|
||||
```
|
||||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
|
|
@ -11,4 +11,12 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm ci
|
||||
- run: npm run all
|
||||
- run: |
|
||||
mkdir -p ./pr
|
||||
echo ${{ github.event.number }} | tee ./pr/number
|
||||
npm run all | tee ./pr/all_result
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
with:
|
||||
name: all
|
||||
path: pr/
|
||||
|
|
|
|||
Loading…
Reference in a new issue