-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fdc96f
commit b3388e9
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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 +1,33 @@ | ||
# Image actions | ||
|
||
Image actions will automatically compress jpeg and png images in Github Pull Requests. | ||
|
||
- **Compression is fast, efficient and lossless** | ||
- Uses mozjpeg + libvips, the best image compression available | ||
- Runs in Github Actions **for free** | ||
|
||
![Preview of image-actions pull request comment](https://user-images.githubusercontent.com/924/62024579-e1470d00-b218-11e9-8655-693ea42ba0f7.png) | ||
|
||
## How to add this to your repository: | ||
|
||
- Add the following steps to a workflow file found at: `.github/main.workflow` (If you don’t have one, create it.) | ||
- Paste in the following: | ||
|
||
```workflow | ||
workflow "Compress images" { | ||
resolves = ["calibreapp/image-actions"] | ||
on = "pull_request" | ||
} | ||
action "calibreapp/image-actions" { | ||
uses = "calibreapp/image-actions@master" | ||
secrets = ["GITHUB_TOKEN"] | ||
} | ||
``` | ||
|
||
This action requires a `GITHUB_TOKEN` so that it has access to commit the optimised images to your repository. | ||
|
||
## Links and resources | ||
|
||
- [View calibre/image-actions on the Github Marketplace](https://github.com/marketplace/actions/calibreapp-image-actions) | ||
- [Mozjpeg](https://github.com/mozilla/mozjpeg) |