https://github.com/planetoftheweb/generate-thumbnails
https://github.com/planetoftheweb/generate-thumbnails
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/planetoftheweb/generate-thumbnails
- Owner: planetoftheweb
- License: mit
- Created: 2021-06-15T22:48:23.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-16T00:03:05.000Z (almost 5 years ago)
- Last Synced: 2025-03-07T12:48:12.915Z (over 1 year ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generate/Compress Thumbnails
This action runs a shell script `entrypoint.sh` file which will expect a folder with images as well as the width you want your thumbnails to be. It will then compress them, and resize them to a specific width (It will automatically calculate the height proportionately).
# Running this action
1. Go to your repo
2. Click on the **Actions** tab
3. Click on the **Set up a workflow yourself** link
4. Use the following script.
```yaml
name: Generate Thumbnails
on:
workflow_dispatch:
jobs:
copy-to-branches:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate Thumbnails Task
uses: planetoftheweb/generate-thumbnails
env:
directory: photos
width: 500
```
5. Click the **Start commit** button
6. Click back on the **Actions** tab
7. Click on the **Generate Thumbnails** workflow
8. Click on **Run Workflow**
The workflow should run automatically, you can monitor it if you want to.