Skip to content

Commit

Permalink
Merge pull request #1 from jveldboom/create-release-process
Browse files Browse the repository at this point in the history
feat: add release workflow
  • Loading branch information
jveldboom authored Mar 15, 2023
2 parents 8adbc78 + e0393f3 commit 31ae8e7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 9 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: release

on:
push:
branches:
- main

permissions:
contents: write
packages: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get next version
uses: jveldboom/action-conventional-versioning@v1
id: version

- name: Log in to the container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push image
run: |
docker build . \
--tag ghcr.io/${GITHUB_REPOSITORY}:${{ steps.version.outputs.version }} \
--tag ghcr.io/${GITHUB_REPOSITORY}:latest
docker push --all-tags ghcr.io/${GITHUB_REPOSITORY}
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ steps.version.outputs.version }}" \
--generate-notes \
--target "${{ github.sha }}"
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
# Docker Google's Guetzli
Run Google's Guetzli within Docker.
# Docker Google's Guetzli
Run Google's Guetzli within Docker.

Visit https://github.com/google/guetzli for Guetzli's full documentation

# Run
- `docker run --rm -v $(PWD):/tmp jveldboom/google-guetzli input.jpg output.jpg`
## Usage
```sh
docker run --rm -v $(PWD):/tmp jveldboom/google-guetzli input.jpg output.jpg
```

# Run Examples
- `docker run --rm -v $(PWD):/tmp jveldboom/google-guetzli --quality 85 ./samples/bees.png ./samples/bees-out.png`
## Run Examples
```sh
docker run --rm -v $(PWD):/tmp jveldboom/google-guetzli --quality 85 ./samples/bees.png ./samples/bees-out.png
```

Original | Processed with 85%
:------------: | :-------------:
![Original](./samples/bees.png)<br>177 KB | ![Original](./samples/bees-out.png)<br> 22 KB
![Original](./samples/rose.jpg)<br>219 KB | ![Original](./samples/rose-out.png)<br> 103 KB

# TODO
- <strike>Reduce container image size. Likely do not need full Ubuntu image</strike>
- <strike>Add to Docker Hub for easier installation</strike>
## TODO
- [ ] create pull request workflow
- [ ] include dockerignore to reduce image size
- [ ] see if we can reduce overall container size

```sh
# dockerfile
apk add --no-cache --virtual .build-deps

...

apk del --no-cache .build-deps
rm -rf /var/tmp/* /tmp/* /opt/build
```

0 comments on commit 31ae8e7

Please sign in to comment.