Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation #1

Merged
merged 50 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9b3c950
init
osterman Jan 8, 2024
6058598
fix typo
osterman Jan 8, 2024
c2aba39
add shell
osterman Jan 8, 2024
b4dce8a
call puppeteer directly
osterman Jan 8, 2024
bfa6956
call puppeteer directly
osterman Jan 8, 2024
c71b18f
allow writing to node_modules
osterman Jan 8, 2024
84a37fe
workdir
osterman Jan 8, 2024
04b5544
run with explicit rw
osterman Jan 8, 2024
d687b7a
run with explicit rw
osterman Jan 8, 2024
a6d0517
export GITHUB_WORKSPACE
osterman Jan 8, 2024
007716b
fix workflow permissions
osterman Jan 8, 2024
f4e6f83
chore: update example image
actions-user Jan 8, 2024
1801bcd
only commit docs
osterman Jan 8, 2024
2bcc145
git ignore node_modules
osterman Jan 8, 2024
34dd7da
show all available evs
osterman Jan 8, 2024
4c6c17f
write output file to input value
osterman Jan 8, 2024
3f862a8
use cat heredoc
osterman Jan 8, 2024
54b39f2
chore: update example image
actions-user Jan 8, 2024
16fb293
fix summary image path
osterman Jan 8, 2024
56c3a89
produce a prettier example
osterman Jan 8, 2024
d3c6483
update README
osterman Jan 8, 2024
35afb7c
chore: update example image
actions-user Jan 8, 2024
da20d01
add inputs
osterman Jan 8, 2024
998c3dc
tweak css
osterman Jan 8, 2024
4c7aaef
chore: update example image
actions-user Jan 8, 2024
009b4ea
add release tagger
osterman Jan 8, 2024
8ae403a
tweak css
osterman Jan 8, 2024
625e11e
chore: update example image
actions-user Jan 8, 2024
efb23ca
add our example
osterman Jan 8, 2024
50af4dc
change viewport dimensions
osterman Jan 8, 2024
667853b
fix viewport width
osterman Jan 8, 2024
9412248
cast to int
osterman Jan 8, 2024
1dabc19
set defaults
osterman Jan 8, 2024
5c023b7
chore: update example image
actions-user Jan 8, 2024
7989526
fix summary image
osterman Jan 8, 2024
85afb8c
fix summary message
osterman Jan 8, 2024
adb33c3
remove artifacts from template
osterman Jan 8, 2024
97f0fec
debug
osterman Jan 8, 2024
89903bc
debug
osterman Jan 8, 2024
eb1fb27
fix file creation
osterman Jan 8, 2024
3633e28
chore: update example image
actions-user Jan 8, 2024
2e8bbeb
remove html-to-image artifact
osterman Jan 9, 2024
237549c
fix readme
osterman Jan 9, 2024
f2f9489
use ${{github.action_path}} instead of ${{ github.workspace }}
osterman Jan 9, 2024
e71dbb0
use ${{github.action_path}} instead of ${{ github.workspace }}
osterman Jan 9, 2024
88806e1
avoid duplicate mount points
osterman Jan 9, 2024
cecf760
fix action path
osterman Jan 9, 2024
e3e9056
add absolute path to OUTPUT
osterman Jan 9, 2024
18ab026
compute the realpath
osterman Jan 9, 2024
ee69bc5
remove broken workflow
osterman Jan 10, 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
75 changes: 0 additions & 75 deletions .github/workflows/auto-readme.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/feature-branch.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Major Release Tagger

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: cloudposse/github-action-major-release-tagger@v1
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.

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

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

jobs:
screenshot:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

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@v3

- name: Run this composite action
id: screenshot
uses: ./ # Use the path to your action directory
with:
# Your action's inputs
url: "file://${{github.workspace}}/test/html/index.html"
output: "docs/example.png"
css: |
body {
background: rgb(2,0,36);
background: linear-gradient(139deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 56%, rgba(147,0,255,1) 100%);
}
customizations: |
"#name": "${{ github.event.repository.name }}"
viewportWidth: 2000
viewportHeight: 800

- uses: stefanzweifel/git-auto-commit-action@v4
name: Commit artifact
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: 'docs/*.png'

- name: Add Image to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true'
run: |
echo "## Generated Screenshot" >> $GITHUB_STEP_SUMMARY
echo "![Generated Screenshot](https://github.com/${{ github.repository }}/blob/${{ steps.auto-commit.outputs.commit_hash }}/${{ steps.screenshot.outputs.file }}?raw=true)" >> $GITHUB_STEP_SUMMARY

- name: No changes
if: steps.auto-commit.outputs.changes_detected == 'false'
run: |
echo "No changes to screenshot" >> $GITHUB_STEP_SUMMARY
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.build-harness
build-harness
build-harness

node_modules

.DS_Store
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ SHELL := /bin/bash
# List of targets the `readme` target should call before generating the readme
export README_DEPS ?= docs/github-action.md

export GITHUB_WORKSPACE ?= $(PWD)

-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)

## Lint terraform code
lint:
$(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate
deps:
npm install

run:
node main.js
Loading