fix: disable post-result if GH_TOKEN secret is not set

This commit is contained in:
Defelo 2025-01-27 17:36:52 +01:00
commit e05c72016e
No known key found for this signature in database
GPG key ID: 2A05272471204DD3

View file

@ -141,6 +141,9 @@ jobs:
- name: fetch report
run: echo ${{ needs.report.outputs.report }} | base64 -d > report.md
- name: post comment
run: gh pr -R NixOS/nixpkgs comment ${{ inputs.pr }} -F report.md
run: |
if [[ -n "$GH_TOKEN" ]]; then
gh pr -R NixOS/nixpkgs comment ${{ inputs.pr }} -F report.md
fi
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}