Skip to content

Initial implementation #5

Initial implementation

Initial implementation #5

Workflow file for this run

name: Test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
html:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
- name: Run your action
id: screenshot
uses: ./ # Use the path to your action directory
with:
# Your action's inputs
url: "file://./test/html/index.html"
output: "docs/example.png"
css: |
body {
background: red;
}
customizations: |
"#name": "${{ github.event.repository.name }}"
canvasWidth: 800
canvasHeight: 600
imageQuality: 80
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "chore: update example image"
commit_user_name: screenshot-action 📼
commit_user_email: [email protected]
commit_author: screenshot-action 📼 <[email protected]>
file_pattern: '*.png'
- name: Add Image to Job Summary
if: steps.auto-commit.outputs.changes_detected == 'true'
run: |
echo "## Demo GIF" >> $GITHUB_STEP_SUMMARY
echo "![Demo GIF](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screenshot.file }}f?raw=true)" >> $GITHUB_STEP_SUMMARY
- name: No changes
if: steps.auto-commit.outputs.changes_detected == 'false'
run: |
echo "No changes to demo" >> $GITHUB_STEP_SUMMARY