Skip to content

Commit

Permalink
Consolidate cached images
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Feb 14, 2024
1 parent 02fe257 commit c8dedc8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ jobs:
tags: idm-console-framework-builder
target: idm-console-framework-builder
cache-from: type=local,src=/tmp/.buildx-cache
outputs: type=docker,dest=idm-console-framework-builder.tar

- name: Store idm-console-framework-builder image
uses: actions/cache@v3
with:
key: idm-console-framework-builder-${{ github.sha }}
path: idm-console-framework-builder.tar
outputs: type=docker

- name: Build idm-console-framework-dist image
uses: docker/build-push-action@v3
Expand All @@ -76,13 +70,7 @@ jobs:
tags: idm-console-framework-dist
target: idm-console-framework-dist
cache-from: type=local,src=/tmp/.buildx-cache
outputs: type=docker,dest=idm-console-framework-dist.tar

- name: Store idm-console-framework-dist image
uses: actions/cache@v3
with:
key: idm-console-framework-dist-${{ github.sha }}
path: idm-console-framework-dist.tar
outputs: type=docker

- name: Build idm-console-framework-runner image
uses: docker/build-push-action@v3
Expand All @@ -94,10 +82,15 @@ jobs:
tags: idm-console-framework-runner
target: idm-console-framework-runner
cache-from: type=local,src=/tmp/.buildx-cache
outputs: type=docker,dest=idm-console-framework-runner.tar
outputs: type=docker

- name: Save IDM Consonle Framework images
run: |
docker images
docker save -o idm-console-framework-images.tar idm-console-framework-builder idm-console-framework-dist idm-console-framework-runner
- name: Store idm-console-framework-runner image
- name: Store IDM Consonle Framework images
uses: actions/cache@v3
with:
key: idm-console-framework-runner-${{ github.sha }}
path: idm-console-framework-runner.tar
key: idm-console-framework-images-${{ github.sha }}
path: idm-console-framework-images.tar
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ jobs:
password: ${{ secrets.REGISTRY_PASSWORD }}
if: vars.REGISTRY != 'ghcr.io'

- name: Retrieve images
- name: Retrieve IDM Console Framework images
uses: actions/cache@v3
with:
key: idm-console-framework-dist-${{ github.sha }}
path: idm-console-framework-dist.tar
key: idm-console-framework-images-${{ github.sha }}
path: idm-console-framework-images.tar

- name: Load images
- name: Load IDM Console Framework images
run: |
docker load --input idm-console-framework-dist.tar
docker load --input idm-console-framework-images.tar
- name: Publish idm-console-framework-dist image
run: |
Expand Down

0 comments on commit c8dedc8

Please sign in to comment.