Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
ee6cd7d
test action
osterman Feb 18, 2024
93a068a
add term files
osterman Feb 18, 2024
49ddc32
add term files
osterman Feb 18, 2024
f46db66
add term files
osterman Feb 18, 2024
a69cfe6
add support for deps
osterman Feb 18, 2024
0a4af05
add support for deps
osterman Feb 18, 2024
01562ca
add support for deps
osterman Feb 18, 2024
7f31fd9
add support for deps
osterman Feb 18, 2024
b46a4dd
flush output immediately
osterman Feb 19, 2024
c76f43c
flush output immediately
osterman Feb 19, 2024
2d4e103
try to use absolute path to css
osterman Feb 19, 2024
6158ee1
commit the right file
osterman Feb 19, 2024
de05e80
chore: update example image
actions-user Feb 19, 2024
6d44749
customize term
osterman Feb 19, 2024
df8ba1d
customize term
osterman Feb 19, 2024
1e2443c
chore: update example image
actions-user Feb 19, 2024
a39c639
test all image formats
osterman Feb 19, 2024
569e4dc
chore: update pdf example image
actions-user Feb 19, 2024
064530c
chore: update svg example image
actions-user Feb 19, 2024
b1e76e9
chore: update png example image
actions-user Feb 19, 2024
1f703ca
handle PDFs specially
osterman Feb 19, 2024
765e2c3
chore: update jpg example image
actions-user Feb 19, 2024
12d8d58
tune css
osterman Feb 19, 2024
565ac84
chore: update jpg example image
actions-user Feb 19, 2024
a32c1fe
chore: update pdf example image
actions-user Feb 19, 2024
077dd1a
chore: update svg example image
actions-user Feb 19, 2024
facf5d5
chore: update png example image
actions-user Feb 19, 2024
3dae532
change default on omit background
osterman Feb 19, 2024
d4aa3d8
chore: update jpg example image
actions-user Feb 19, 2024
7989206
chore: update svg example image
actions-user Feb 19, 2024
8ef590c
chore: update pdf example image
actions-user Feb 19, 2024
a038ac3
chore: update png example image
actions-user Feb 19, 2024
71531b8
make html and ansi first class outputs
osterman Feb 19, 2024
26be3dc
fix contains
osterman Feb 19, 2024
e673b74
fix contains
osterman Feb 19, 2024
3b10b06
fix contains
osterman Feb 19, 2024
1117449
add sumamries for ansi and html
osterman Feb 19, 2024
d3e8725
add sumamries for ansi and html
osterman Feb 19, 2024
624e1ff
fix cat
osterman Feb 19, 2024
e80188a
fix cat
osterman Feb 19, 2024
cc9c332
chore: update jpg example image
actions-user Feb 19, 2024
684ad07
chore: update png example image
actions-user Feb 19, 2024
fb648dd
chore: update svg example image
actions-user Feb 19, 2024
5de4efd
chore: update pdf example image
actions-user Feb 19, 2024
4a16e33
fix outputs and commits
osterman Feb 19, 2024
b6e56f8
fix deps
osterman Feb 19, 2024
a49a463
chore: update html example image
actions-user Feb 19, 2024
c5e441a
chore: update ansi example image
actions-user Feb 19, 2024
28d253a
chore: update pdf example image
actions-user Feb 19, 2024
e7a2945
chore: update png example image
actions-user Feb 19, 2024
36f816c
chore: update jpg example image
actions-user Feb 19, 2024
1b0b533
rebase before push
osterman Feb 19, 2024
32b17c9
stash and apply
osterman Feb 19, 2024
215c7b7
optionally stash
osterman Feb 19, 2024
7ff7d8c
chore: update html example image
actions-user Feb 19, 2024
f4a824b
chore: update ansi example image
actions-user Feb 19, 2024
156afa2
optionally stash
osterman Feb 19, 2024
637c42a
chore: update png example image
actions-user Feb 19, 2024
0aec337
chore: update jpg example image
actions-user Feb 19, 2024
d8e13a8
chore: update svg example image
actions-user Feb 19, 2024
01661be
chore: update pdf example image
actions-user Feb 19, 2024
ed4fe1b
install missing dep
osterman Feb 19, 2024
6fff688
chore: update html example image
actions-user Feb 19, 2024
a602883
chore: update ansi example image
actions-user Feb 19, 2024
35e78a3
chore: update jpg example image
actions-user Feb 19, 2024
9f1b8e1
chore: update png example image
actions-user Feb 19, 2024
ddfe190
rebuild readme
osterman Feb 19, 2024
fec4fb1
chore: update ansi example image
actions-user Feb 19, 2024
6ca4a41
chore: update html example image
actions-user Feb 19, 2024
abda01a
chore: update pdf example image
actions-user Feb 19, 2024
31a797f
chore: update svg example image
actions-user Feb 19, 2024
eca347c
chore: update png example image
actions-user Feb 19, 2024
3c47f33
chore: update jpg example image
actions-user Feb 19, 2024
781af6a
when theme is none, we should also not produce the header
osterman Feb 19, 2024
e78099f
when theme is none, we should also not produce the header
osterman Feb 19, 2024
71ed9a4
chore: update ansi example image
actions-user Feb 19, 2024
3be2a77
chore: update html example image
actions-user Feb 19, 2024
b3d27b1
chore: update svg example image
actions-user Feb 19, 2024
0765a50
chore: update jpg example image
actions-user Feb 19, 2024
36e6886
chore: update png example image
actions-user Feb 19, 2024
dbc3631
chore: update pdf example image
actions-user Feb 19, 2024
e3b6d83
fix right margin
osterman Feb 19, 2024
6c55809
chore: update ansi example image
actions-user Feb 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .github/workflows/test-negative.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/test-positive.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Test

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: write
packages: read

jobs:


screengrab:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.type }}
cancel-in-progress: true
strategy:
matrix:
type: [svg, png, jpg, pdf, html, ansi]

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
- uses: actions/checkout@v4

- name: Run this composite action
id: screengrab
uses: ./ # Use the path to your action directory
with:
# Your action's inputs
command: "(fortune ascii-art && fortune computers) | lolcat"
dependencies: >-
lolcat
fortune
fortunes
output: "docs/example.${{ matrix.type }}"
outputType: "${{ matrix.type }}"
viewportWidth: 600
viewportHeight: 450
token: ${{ secrets.GITHUB_TOKEN }}

- name: Rebase before push (optimistic concurrency)
shell: bash
run: |
git stash || true
git pull --rebase -X ours origin ${{ github.ref }} --rebase
git stash apply || true

- uses: stefanzweifel/git-auto-commit-action@v5
name: Commit artifact
id: auto-commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "chore: update ${{matrix.type}} example image"
commit_user_name: screengrab-action 💻
commit_user_email: [email protected]
commit_author: screengrab-action 💻 <[email protected]>
file_pattern: '${{ steps.screengrab.outputs.file }}'

- name: Add Image to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true' && (matrix.type == 'svg' || matrix.type == 'png' || matrix.type == 'jpg')
run: |
echo "## Generated Screengrab (${{matrix.type}})" >> $GITHUB_STEP_SUMMARY
echo "![Generated Screengrab](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screengrab.outputs.image }}?raw=true)" >> $GITHUB_STEP_SUMMARY

- name: Add PDF to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true' && matrix.type == 'pdf'
run: |
echo "## Generated Screengrab (${{matrix.type}})" >> $GITHUB_STEP_SUMMARY
echo "[Generated PDF](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screengrab.outputs.image }}?raw=true)" >> $GITHUB_STEP_SUMMARY

- name: Add HTML to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true' && matrix.type == 'html'
run: |
echo "## Generated Screengrab (${{matrix.type}})" >> $GITHUB_STEP_SUMMARY
echo "[Generated HTML](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screengrab.outputs.html }}?raw=true)" >> $GITHUB_STEP_SUMMARY

- name: Add ANSI to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true' && matrix.type == 'ansi'
run: |
echo "## Generated Screengrab (${{matrix.type}})" >> $GITHUB_STEP_SUMMARY
echo "[Generated ANSI](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screengrab.outputs.ansi }}?raw=true)" >> $GITHUB_STEP_SUMMARY

- name: No changes
if: steps.auto-commit.outputs.changes_detected == 'false'
run: |
echo "No changes to screengrab" >> $GITHUB_STEP_SUMMARY
Loading