From 85751b35edc875ebca8314749fec9e468a7eef67 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Thu, 27 Jun 2024 03:14:27 +0200 Subject: [PATCH] ci: create Artifactview PR comments --- .gitea/workflows/ci.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e695d65..46c460f 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -28,3 +28,10 @@ jobs: with: name: test path: target/nextest/ci/junit.xml + + - name: 🔗 Artifactview PR comment + if: ${{ always() && github.event_name == 'pull_request' }} + run: | + if [[ "$GITEA_ACTIONS" == "true" ]]; then RUN_NUMBER="$GITHUB_RUN_NUMBER"; else RUN_NUMBER="$GITHUB_RUN_ID"; fi + curl -SsL --fail-with-body -w "\n" -X POST https://av.thetadev.de/.well-known/api/prComment -H "Content-Type: application/json" \ + --data '{"url": "'"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$RUN_NUMBER"'", "pr": ${{ github.event.number }}}'