👷 Update CI

This commit is contained in:
marocchino 2023-03-25 10:05:34 +09:00
parent 10b0611451
commit 87bbf557c1
No known key found for this signature in database
GPG key ID: 326883DCCAF7FFEA
2 changed files with 22 additions and 45 deletions

View file

@ -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.

View file

@ -15,9 +15,26 @@ jobs:
set -o pipefail set -o pipefail
mkdir -p ./pr mkdir -p ./pr
echo ${{ github.event.number }} | tee ./pr/number echo ${{ github.event.number }} | tee ./pr/number
yarn all |& tee ./pr/all_result EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
- uses: actions/upload-artifact@v3 echo "all_result<<$EOF" >> "$GITHUB_ENV"
if: ${{ github.event_name == 'pull_request' && (success() || failure()) }} yarn all >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
id: all
- uses: ./
with: with:
name: all header: All
path: pr/ 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.