Skip to content

Commit

Permalink
Update workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Nov 12, 2023
1 parent d3625d2 commit eb96497
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/icon-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,23 @@ jobs:
- name: Upload PNG to Repository ⬆️
run: |
mkdir -p review-images
mv ./preview.png review-images/${{ github.event.pull_request.number }}.png
mv ./preview.png review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout -b review-images
git add review-images/
git commit -m "Add generated review image"
git config pull.rebase true
git push origin review-images --force
git pull origin review-images -X ours
git push origin review-images
- name: Post previews in PR
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const pngFilePath = './preview.png';
const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}.png)';
const commentBody = '![Generated PNG](https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + 'review-images/review-images/${{ github.event.pull_request.number }}_${{ github.sha }}.png)';
github.rest.issues.createComment({
issue_number: context.issue.number,
Expand Down

0 comments on commit eb96497

Please sign in to comment.