Skip to content

Commit fbae217

Browse files
authored
docs: Document output.json and artifact upload support (#706)
1 parent f6b34dc commit fbae217

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,3 +496,34 @@ To explicitly disable sharing:
496496
## Minimal Output
497497

498498
To reduce console output in CI, set `no-table: true` and `no-progress-bar: true` in your action configuration.
499+
500+
## Persisting Results as Artifacts
501+
502+
The action writes evaluation results to `output.json` in the working directory. You can upload this as a GitHub Action artifact to preserve results beyond the 2-week shareable URL expiration:
503+
504+
```yaml
505+
jobs:
506+
evaluate:
507+
runs-on: ubuntu-latest
508+
permissions:
509+
contents: read
510+
pull-requests: write
511+
steps:
512+
- uses: actions/checkout@v4
513+
514+
- name: Run promptfoo evaluation
515+
uses: promptfoo/promptfoo-action@v1
516+
with:
517+
github-token: ${{ secrets.GITHUB_TOKEN }}
518+
config: 'promptfooconfig.yaml'
519+
520+
- name: Upload results
521+
uses: actions/upload-artifact@v4
522+
if: always() # Upload even if evaluation fails
523+
with:
524+
name: promptfoo-results
525+
path: output.json
526+
retention-days: 90
527+
```
528+
529+
Artifacts are retained for up to 90 days and can be downloaded from the GitHub Actions UI or via the GitHub API.

0 commit comments

Comments
 (0)