Skip to content

Commit

Permalink
Add cache to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
jfaldanam committed Jul 24, 2023
1 parent 97b6fc8 commit 3f004e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-evolver-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ jobs:
steps:
- name: Build and push the Docker Image to the GitHub Container Registry
uses: actions/checkout@v3
- name: Cache main image layers
uses: actions/cache@v3
with:
path: /tmp/.docker-cache
key: docker-layer-${{ hashFiles('evolver-dashboard/pyproject.toml') }}
- name: Build and push the Docker Image to the GitHub Container Registry
uses: docker/[email protected]
with:
Expand All @@ -21,4 +26,6 @@ jobs:
context: ./evolver-dashboard
file: ./evolver-dashboard/Dockerfile
push: true
cache-from: type=local,src=/tmp/.docker-cache
cache-to: type=local,mode=max,dest=/tmp/.docker-cache
tags: ghcr.io/jmetal/evolver-dashboard:latest,ghcr.io/jmetal/evolver-dashboard:${{ github.event.release.tag_name }}
5 changes: 5 additions & 0 deletions .github/workflows/build-evolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
steps:
- name: Build and push the Docker Image to the GitHub Container Registry
uses: actions/checkout@v3
- name: Cache main image layers
uses: actions/cache@v3
with:
path: /tmp/.docker-cache
key: docker-layer-${{ hashFiles('pom.xml') }}
- name: Build and push the Docker Image to the GitHub Container Registry
uses: docker/[email protected]
with:
Expand Down

0 comments on commit 3f004e2

Please sign in to comment.