]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: Use artifacts to pass around pr context
authorDaan De Meyer <daan@amutable.com>
Tue, 17 Mar 2026 23:02:26 +0000 (00:02 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 18 Mar 2026 06:27:41 +0000 (07:27 +0100)
The current approach runs into issues on large prs:
https://github.com/systemd/systemd/actions/runs/23220105199/job/67490722033

.github/workflows/claude-review.yml

index 652dfd61a5b22c1f1986c901d130e3cfdbcd40ea..344b3d83deaa893c0fd8b1178711df2cbcc3e5d8 100644 (file)
@@ -56,7 +56,6 @@ jobs:
     outputs:
       pr_number: ${{ steps.context.outputs.pr_number }}
       comment_id: ${{ steps.context.outputs.comment_id }}
-      pr_context: ${{ steps.context.outputs.pr_context }}
 
     steps:
       - name: Auto-add claude-review label for trusted contributors
@@ -123,7 +122,16 @@ jobs:
 
             core.setOutput("pr_number", prNumber);
             core.setOutput("comment_id", commentId);
-            core.setOutput("pr_context", JSON.stringify(prContext));
+
+            const fs = require("fs");
+            fs.writeFileSync("pr-context.json", JSON.stringify(prContext));
+
+      - name: Upload PR context
+        uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
+        with:
+          name: pr-context
+          path: pr-context.json
+          archive: false
 
   review:
     runs-on: ubuntu-latest
@@ -147,10 +155,10 @@ jobs:
           PR_NUMBER: ${{ needs.setup.outputs.pr_number }}
         run: git fetch origin "pull/${PR_NUMBER}/head:pr-review"
 
-      - name: Write PR context
-        env:
-          PR_CONTEXT: ${{ needs.setup.outputs.pr_context }}
-        run: printenv PR_CONTEXT > pr-context.json
+      - name: Download PR context
+        uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
+        with:
+          name: pr-context
 
       - name: Configure AWS credentials
         uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7