Skip to content

Commit fc77197

Browse files
committed
fix: simplify workflow - remove PR comment, only upload artifacts for fork PRs
1 parent c39a444 commit fc77197

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.github/workflows/generate-c4-diagrams.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,10 @@ jobs:
4848
fi
4949
5050
- name: Upload diagrams as artifacts
51-
# Upload artifacts for PRs from forks (no write access) or for any PR for convenience
52-
if: github.event_name == 'pull_request'
51+
# Upload artifacts for PRs from forks (they can't push commits)
52+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
5353
uses: actions/upload-artifact@v4
5454
with:
5555
name: c4-diagrams
5656
path: docs/images/
57-
retention-days: 7
58-
59-
- name: Comment on PR with generated diagrams
60-
# Only comment on PRs from forks where we can't push commits
61-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
62-
uses: peter-evans/create-or-update-comment@v4
63-
with:
64-
token: ${{ secrets.GITHUB_TOKEN }}
65-
issue-number: ${{ github.event.pull_request.number }}
66-
body: |
67-
## C4 Diagrams Generated
68-
69-
The C4 diagrams have been generated for this PR. Since this is from a fork, the diagrams are available as artifacts.
70-
71-
**[Download diagrams from workflow artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})**
72-
73-
Once this PR is merged, the diagrams will be automatically committed to the main branch.
57+
retention-days: 7

0 commit comments

Comments
 (0)