generated from cloudposse-github-actions/composite-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: screenshot-action 📼 <[email protected]>
- Loading branch information
1 parent
fc4d0cd
commit 5687d69
Showing
16 changed files
with
623 additions
and
399 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
.build-harness | ||
build-harness | ||
build-harness | ||
|
||
node_modules | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.