Temporary: post CI failure output to the PR
This commit is contained in:
parent
a9c6938f0e
commit
4b90aa8348
1 changed files with 16 additions and 2 deletions
|
|
@ -34,10 +34,24 @@ jobs:
|
|||
"https://github.com/eriknihlen/OpenAC/releases/download/${OPENAC_API_RELEASE_TAG}/AcDream.Plugin.Abstractions.${OPENAC_API_VERSION}.nupkg"
|
||||
|
||||
- name: Build
|
||||
run: dotnet build OpenAC.MosswartMassacre.slnx -c Release --nologo
|
||||
run: dotnet build OpenAC.MosswartMassacre.slnx -c Release --nologo 2>&1 | tee -a ci.log; exit ${PIPESTATUS[0]}
|
||||
shell: bash
|
||||
|
||||
- name: Test
|
||||
run: dotnet test OpenAC.MosswartMassacre.slnx -c Release --no-build --nologo
|
||||
run: dotnet test OpenAC.MosswartMassacre.slnx -c Release --no-build --nologo 2>&1 | tee -a ci.log; exit ${PIPESTATUS[0]}
|
||||
shell: bash
|
||||
|
||||
- name: Temporary - post the failure output
|
||||
if: failure()
|
||||
env:
|
||||
TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
run: |
|
||||
(dotnet --info 2>&1 | head -20; echo ----; tail -c 6000 ci.log 2>/dev/null) > diag.txt || true
|
||||
python3 -c 'import json,sys; print(json.dumps({"body": "CI failure output:
|
||||
```
|
||||
" + open("diag.txt", errors="replace").read() + "
|
||||
```"}))' > diag.json
|
||||
curl -fsS -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" -d @diag.json "${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/issues/2/comments" > /dev/null
|
||||
|
||||
release:
|
||||
# Tag pushes only, once the build and tests are green.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue