Skip to content

Commit

Permalink
update screenshot-on-issue.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dinxsh authored Aug 5, 2024
1 parent 05feb26 commit 5db7c10
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/screenshot-on-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,24 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install Puppeteer
run: npm install puppeteer
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxshmfence-dev
sudo apt-get install -y wget gnupg
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable
npm install puppeteer-core
- name: Capture Screenshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node capture-screenshot.js ${{ github.event.issue.user.login }}
run: node .github/workflows/capture-screenshot.js ${{ github.event.issue.user.login }}

- name: Upload Screenshot
uses: actions/upload-artifact@v3
with:
name: screenshot
path: screenshots/
- name: Commit and Push Screenshot
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add screenshots/
git commit -m "Add screenshot for ${{ github.event.issue.user.login }}"
git push

0 comments on commit 5db7c10

Please sign in to comment.