From e32fe781061335e18e9c0353f681fc0dacae965b Mon Sep 17 00:00:00 2001 From: Ed Asriyan Date: Wed, 25 Oct 2023 12:28:41 +0300 Subject: [PATCH] Update description on DockerHub on release --- .github/workflows/cd-release.yml | 45 +++++++++++++++++++++++++++----- README.dockerhub.md | 22 ++++++++++++++++ 2 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 README.dockerhub.md diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index 7c2be36..a5f5355 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -68,11 +68,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: - - lottie-to-apng - - lottie-to-gif - - lottie-to-png - - lottie-to-webp + format: + - apng + - gif + - png + - webp steps: - name: Login to DockerHub uses: docker/login-action@v2 @@ -81,10 +81,41 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Create manifest - run: docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:amd64 --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:arm64 + run: docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:latest --amend ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:amd64 --amend ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:arm64 - name: Push manifest - run: docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest + run: docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }}:latest + + - name: Make format uppercase + id: format + uses: ASzc/change-string-case-action@v5 + with: + string: ${{ matrix.format }} + + - uses: actions/checkout@v4 + + - name: Find and replace FORMAT + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: FORMAT + replace: ${{ steps.format.outputs.uppercase }} + regex: false + + - name: Find and replace format + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: format + replace: ${{ matrix.format }} + regex: false + + - name: Update description at DockerHub + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: ${{ secrets.DOCKERHUB_USERNAME }}/lottie-to-${{ matrix.format }} + short-description: Converts Lottie Animations (.json / .lottie) and Telegram stickers (*.tgs) to ${{ steps.format.outputs.uppercase }}} + readme-filepath: README.dockerhub.md create-release: name: Release executables diff --git a/README.dockerhub.md b/README.dockerhub.md new file mode 100644 index 0000000..6116868 --- /dev/null +++ b/README.dockerhub.md @@ -0,0 +1,22 @@ +# Lottie Animations (.json) and Telegram Stickers (*.tgs) to FORMAT converter +Replace with directory with Lottie animations / Telegram stickers and run: +```bash +docker run --rm -v :/source edasriyan/lottie-to-format +``` + +You can provide parameters via env variables: +* `HEIGHT`: Output image height. Default: 512 +* `WIDTH`: Output image width. Default: 512 +* `FPS`: Output frame rate. Default: apng,png,webp - 60; gif - 50 +* `QUALITY`: Output quality. Default: 90 +* `THREADS`: Number of threads to use. Default: number of CPUs + +Example: +```bash +docker run --rm -e HEIGHT=256 -e WIDTH=256 -e FPS=30 -v /home/ed/Downloads/lottie-animations:/source edasriyan/lottie-to-format +``` + +Results will be saved next to each source file in the same directory. + +## Source +https://github.com/ed-asriyan/lottie-converter