feat(.github/workflows): add create-screenshots.yml to automate screenshot creation refactor(.github/workflows): remove redundant screenshot creation steps from screenshots.yml feat: add screenshots.json to manage screenshot configurations The new create-screenshots.yml workflow automates the process of creating screenshots for pull requests, improving efficiency and reducing manual effort. The redundant screenshot creation steps in screenshots.yml have been removed to avoid duplication and maintain cleaner code. The new screenshots.json file allows for easier management and configuration of the screenshots to be created. #110
Workflow file for this run
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
--- | |
name: screenshots | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
actions: write | |
jobs: | |
screenshots: | |
if: ${{ ! contains(' | |
release-please--branches | |
dependabot/ | |
', github.head_ref) | |
}} | |
name: screenshots | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
- name: github-profile-border | |
uses: jruipinto/ImageMagick-action@f8361c3ab427051432299cef10d7c76424f7ff6d | |
with: | |
command: convert github-profile.png -shave 1x1 -bordercolor black -border 1 github-profile-border.png | |
- name: github-fork-border | |
uses: jruipinto/ImageMagick-action@f8361c3ab427051432299cef10d7c76424f7ff6d | |
with: | |
command: convert github-fork.png -shave 1x1 -bordercolor black -border 1 github-fork-border.png | |
- name: overlay-arrow | |
run: | | |
composite -geometry +1000+35 docs/img/overlays/pointer-45.png github-fork-border.png github-fork-arrow.png | |
rm github-fork-border.png | |
mv github-fork-arrow.png github-fork.png | |
composite -geometry +522+158 docs/img/overlays/pointer-315.png github-profile.png github-profile-arrow.png | |
mv github-profile-arrow.png github-profile.png | |
rm github-profile-border.png | |
- name: make-drop-shadow | |
run: | | |
for entry in github-profile.png github-fork.png | |
do | |
convert $entry \( +clone -background black -shadow 40x50+0+36 \) \ | |
+swap \ | |
-background none \ | |
-layers merge \ | |
+repage \ | |
output.png | |
convert output.png -bordercolor none -border 32 docs/img/$entry | |
rm $entry output.png | |
done | |
- name: Push changes | |
run: | | |
git config user.name "$(git log -n 1 --pretty=format:%an)" | |
git config user.email "$(git log -n 1 --pretty=format:%ae)" | |
git add . | |
git commit -m "docs: updating screenshots" | |
git push |