mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 20:41:15 +00:00
👷 Update CI
This commit is contained in:
parent
10b0611451
commit
87bbf557c1
2 changed files with 22 additions and 45 deletions
40
.github/workflows/comment_on_workflow_run.yml
vendored
40
.github/workflows/comment_on_workflow_run.yml
vendored
|
|
@ -1,40 +0,0 @@
|
|||
name: Comment on Workflow Run
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- "Test"
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: on artifact
|
||||
id: artifact
|
||||
uses: marocchino/on_artifact@v1
|
||||
with:
|
||||
name: all
|
||||
- uses: ./
|
||||
with:
|
||||
header: All
|
||||
number: ${{ steps.artifact.outputs.number }}
|
||||
message: |
|
||||
<details open>
|
||||
<summary>output of yarn all</summary>
|
||||
|
||||
```
|
||||
${{ steps.artifact.outputs.all_result }}
|
||||
```
|
||||
</details>
|
||||
- uses: ./
|
||||
with:
|
||||
header: All
|
||||
number: ${{ steps.artifact.outputs.number }}
|
||||
append: true
|
||||
hide_details: true
|
||||
message: |
|
||||
The build is over.
|
||||
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
|
|
@ -15,9 +15,26 @@ jobs:
|
|||
set -o pipefail
|
||||
mkdir -p ./pr
|
||||
echo ${{ github.event.number }} | tee ./pr/number
|
||||
yarn all |& tee ./pr/all_result
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'pull_request' && (success() || failure()) }}
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "all_result<<$EOF" >> "$GITHUB_ENV"
|
||||
yarn all >> "$GITHUB_ENV"
|
||||
echo "$EOF" >> "$GITHUB_ENV"
|
||||
id: all
|
||||
- uses: ./
|
||||
with:
|
||||
name: all
|
||||
path: pr/
|
||||
header: All
|
||||
message: |
|
||||
<details open>
|
||||
<summary>output of yarn all</summary>
|
||||
|
||||
```
|
||||
${{ env.all_result }}
|
||||
```
|
||||
</details>
|
||||
- uses: ./
|
||||
with:
|
||||
header: All
|
||||
append: true
|
||||
hide_details: true
|
||||
message: |
|
||||
The build is over.
|
||||
|
|
|
|||
Loading…
Reference in a new issue