Skip to content

Commit d19f7ad

Browse files
committed
more vibe coded actions
1 parent 0f537bd commit d19f7ad

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/lint-and-compile-workflow.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,22 @@ jobs:
7171
name: preview-readme-md
7272
path: README.md
7373
retention-days: 3
74-
- name: Comment to PR with artifact link
74+
75+
- name: Fetch artifact URL
76+
id: artifact
7577
env:
7678
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7779
run: |
78-
ARTIFACT_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts \
79-
--jq '.artifacts[] | select(.name == "preview-readme-md") | .archive_download_url')
80+
ARTIFACT_ID=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts \
81+
--jq '.artifacts[] | select(.name == "preview-readme-md") | .id')
82+
echo "url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID" >> $GITHUB_OUTPUT
83+
84+
- name: Comment with full artifact link
85+
uses: peter-evans/create-or-update-comment@v4
86+
if: github.event_name == 'pull_request'
87+
with:
88+
issue-number: ${{ github.event.pull_request.number }}
89+
body: |
90+
✅ [Download preview-readme-md artifact](${{ steps.artifact.outputs.url }})
8091
81-
gh pr comment ${{ github.event.pull_request.number }} \
82-
--body "✅ [Download preview-readme-md Artifact]($ARTIFACT_URL)"
8392

0 commit comments

Comments
 (0)