Skip to content

add n26

add n26 #19

Workflow file for this run

name: Format images
on:
pull_request:
paths:
- 'logoIcons/**/*.jpg'
- 'logoIcons/**/*.jpeg'
- 'logoIcons/**/*.png'
- 'logoIcons/**/*.webp'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: mfinelli/setup-imagemagick@v5
- name: Get logos icons changed
id: changed-logos-icons
uses: tj-actions/changed-files@v37
with:
separator: ","
files: |
./logoIcons
- name: Resize to 200x200x
run: |
IFS=$','
vals="${{ steps.changed-logos.outputs.all_changed_and_modified_files }}"
for file in $vals; do
magick mogrify -resize 200x200 "$file";
done
- name: Format to png
run: |
IFS=$','
vals="${{ steps.changed-logos.outputs.all_changed_and_modified_files }}"
for file in $vals; do
magick mogrify -format png "$file";
done
- name: Remove any left over none png images from mogrify command
run: cd ./logoIcons && find . -type f ! -name '*.png' -delete
- name: Compress images
uses: calibreapp/image-actions@main
with:
compressOnly: true
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add -A
git commit -m "Delete non-PNG images and resize other images"
git push