Skip to content

Commit

Permalink
Add github image compression action (#298)
Browse files Browse the repository at this point in the history
* Add github image compression action

* Optimised images with calibre/image-actions

* Update image action PR trigger

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
chenrui333 and github-actions[bot] committed Feb 3, 2020
1 parent abbba57 commit 69c15d6
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/calibre/image-actions.yml
@@ -0,0 +1,9 @@
# https://github.com/marketplace/actions/image-actions
jpeg:
quality: 80
png:
quality: 100
webp:
quality: 80
ignorePaths:
- "node_modules/**"
21 changes: 21 additions & 0 deletions .github/workflows/image-action.yml
@@ -0,0 +1,21 @@
# https://github.com/marketplace/actions/image-actions
name: Compress images

on:
pull_request:
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'

jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: calibreapp/image-actions
uses: docker://calibreapp/github-image-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Binary file modified static/fork-repo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/open-pr.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/pull-request.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/self-assign.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/wuhan2020.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 69c15d6

Please sign in to comment.