Skip to content

Commit

Permalink
Use docker/build-push-action with maximum cachinng
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-asriyan committed Oct 25, 2023
1 parent 4bcc9f9 commit ff09fab
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/build-linux-and-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,67 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker caching
uses: jpribyl/[email protected]
continue-on-error: true
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

- name: Build lottie-to-apng
run: docker build -t lottie-to-apng:${{ inputs.arch }} --target lottie-to-apng --platform ${{ inputs.arch }} .

uses: docker/build-push-action@v4
with:
context: .
tags: lottie-to-apng:${{ inputs.arch }}
platforms: ${{ inputs.arch }}
target: lottie-to-apng
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload lottie-to-apng as artifact
uses: ishworkh/[email protected]
with:
image: lottie-to-apng:${{ inputs.arch }}

- name: Build lottie-to-gif
run: docker build -t lottie-to-gif:${{ inputs.arch }} --target lottie-to-gif --platform ${{ inputs.arch }} .
uses: docker/build-push-action@v4
with:
context: .
tags: lottie-to-gif:${{ inputs.arch }}
platforms: ${{ inputs.arch }}
target: lottie-to-gif
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload lottie-to-gif as artifact
uses: ishworkh/[email protected]
with:
image: lottie-to-gif:${{ inputs.arch }}

- name: Build lottie-to-png
run: docker build -t lottie-to-png:${{ inputs.arch }} --target lottie-to-png --platform ${{ inputs.arch }} .
uses: docker/build-push-action@v4
with:
context: .
tags: lottie-to-png:${{ inputs.arch }}
platforms: ${{ inputs.arch }}
target: lottie-to-png
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload lottie-to-png as artifact
uses: ishworkh/[email protected]
with:
image: lottie-to-png:${{ inputs.arch }}

- name: Build lottie-to-webp
run: docker build -t lottie-to-webp:${{ inputs.arch }} --target lottie-to-webp --platform ${{ inputs.arch }} .
uses: docker/build-push-action@v4
with:
context: .
tags: lottie-to-webp:${{ inputs.arch }}
platforms: ${{ inputs.arch }}
target: lottie-to-webp
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload lottie-to-webp as artifact
uses: ishworkh/[email protected]
Expand Down

0 comments on commit ff09fab

Please sign in to comment.