Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
benschwarz committed Jul 29, 2019
1 parent 6fdc96f commit b3388e9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
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:/marketplace/actions/calibreapp-image-actions)
- [Mozjpeg](https:/mozilla/mozjpeg)

0 comments on commit b3388e9

Please sign in to comment.