-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8984799
commit 6340be0
Showing
4 changed files
with
120 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CD | Push to DockerHub | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- CI | Build & Test | ||
types: | ||
- completed | ||
branches: | ||
- master | ||
|
||
jobs: | ||
push: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: [lottie-to-apng, lottie-to-gif, lottie-to-png, lottie-to-png, lottie-to-webp] | ||
steps: | ||
- name: Download ${{ matrix.image }} image as artefact | ||
uses: ishworkh/docker-image-artifact-download@v2.0.1 | ||
with: | ||
workflow: CI | Build & Test | ||
workflow_run_id: ${{ github.event.workflow_run.workflow.id }} | ||
image: ${{ matrix.image }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push ${{ matrix.image }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
target: ${{ matrix.image }} | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: CI | Build & Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build docker images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build lottie-to-apng | ||
uses: docker/build-push-action@v3 | ||
with: | ||
target: lottie-to-apng | ||
tags: lottie-to-apng | ||
load: true | ||
|
||
- name: Upload lottie-to-apng as artifact | ||
uses: ishworkh/docker-image-artifact-upload@v2.0.1 | ||
with: | ||
image: lottie-to-apng | ||
|
||
- name: Build lottie-to-gif | ||
uses: docker/build-push-action@v3 | ||
with: | ||
target: lottie-to-gif | ||
tags: lottie-to-gif | ||
load: true | ||
|
||
- name: Upload lottie-to-gif as artifact | ||
uses: ishworkh/docker-image-artifact-upload@v2.0.1 | ||
with: | ||
image: lottie-to-gif | ||
|
||
- name: Build lottie-to-png | ||
uses: docker/build-push-action@v3 | ||
with: | ||
target: lottie-to-png | ||
tags: lottie-to-png | ||
load: true | ||
|
||
- name: Upload lottie-to-png as artifact | ||
uses: ishworkh/docker-image-artifact-upload@v2.0.1 | ||
with: | ||
image: lottie-to-png | ||
|
||
- name: Build lottie-to-webp | ||
uses: docker/build-push-action@v3 | ||
with: | ||
target: lottie-to-webp | ||
tags: lottie-to-webp | ||
load: true | ||
|
||
- name: Upload lottie-to-webp as artifact | ||
uses: ishworkh/docker-image-artifact-upload@v2.0.1 | ||
with: | ||
image: lottie-to-webp | ||
|
||
test: | ||
name: Run tests | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: [lottie-to-apng, lottie-to-gif, lottie-to-png, lottie-to-webp] | ||
steps: | ||
- name: Download ${{ matrix.image }} image as artefact | ||
uses: ishworkh/docker-image-artifact-download@v2.0.1 | ||
with: | ||
image: ${{ matrix.image }} | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Run ${{ matrix.image }} tests | ||
run: docker run --rm -v $(pwd)/test-files:/source ${{ matrix.image }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters