Skip to content

Commit

Permalink
Updated id for cache-key
Browse files Browse the repository at this point in the history
  • Loading branch information
nialdaly committed Jan 9, 2025
1 parent daaee2d commit 483a201
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,29 @@ jobs:
git clone https://github.com/kubernetes-sigs/cloud-provider-kind
- name: Generate cloud-provider-kind cache key
id: cloud-provider-kind-cache-key
run: |
# echo "hash=$(cd cloud-provider-kind && find . -type f -exec sha256sum {} \; | sort | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
echo "hash=$(cd cloud-provider-kind && git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Cache cloud-provider-kind image
id: cloud-provider-cache
id: cloud-provider-kind-cache
uses: actions/cache@v3
with:
path: /tmp/cloud-provider-kind-image
key: cloud-provider-kind-${{ steps.cloud-provider-cache.outputs.hash }}
key: cloud-provider-kind-${{ steps.cloud-provider-kind-cache-key.outputs.hash }}

- name: Load cached image
if: steps.cloud-provider-cache.outputs.cache-hit == 'true'
if: steps.cloud-provider-kind-cache.outputs.cache-hit == 'true'
run: |
docker load < /tmp/cloud-provider-kind-image
docker image ls
- name: Set up Docker Buildx
if: steps.cloud-provider-cache.outputs.cache-hit != 'true'
if: steps.cloud-provider-kind-cache.outputs.cache-hit != 'true'
uses: docker/setup-buildx-action@v3

- name: Build cloud-provider-kind image
if: steps.cloud-provider-cache.outputs.cache-hit != 'true'
if: steps.cloud-provider-kind-cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@v6
with:
context: ./cloud-provider-kind
Expand Down Expand Up @@ -105,27 +105,27 @@ jobs:
git clone https://github.com/kubernetes-sigs/cloud-provider-kind
- name: Generate cloud-provider-kind cache key
id: cloud-provider-kind-cache-key
run: |
# echo "hash=$(cd cloud-provider-kind && find . -type f -exec sha256sum {} \; | sort | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
echo "hash=$(cd cloud-provider-kind && git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Cache cloud-provider-kind image
id: cloud-provider-cache
id: cloud-provider-kind-cache
uses: actions/cache@v3
with:
path: /tmp/cloud-provider-kind-image
key: cloud-provider-kind-${{ steps.cloud-provider-cache.outputs.hash }}
key: cloud-provider-kind-${{ steps.cloud-provider-kind-cache-key.outputs.hash }}

- name: Load cached image
if: steps.cloud-provider-cache.outputs.cache-hit == 'true'
if: steps.cloud-provider-kind-cache.outputs.cache-hit == 'true'
run: docker load < /tmp/cloud-provider-kind-image

- name: Set up Docker Buildx
if: steps.cloud-provider-cache.outputs.cache-hit != 'true'
if: steps.cloud-provider-kind-cache.outputs.cache-hit != 'true'
uses: docker/setup-buildx-action@v3

- name: Build cloud-provider-kind image
if: steps.cloud-provider-cache.outputs.cache-hit != 'true'
if: steps.cloud-provider-kind-cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@v6
with:
context: ./cloud-provider-kind
Expand Down

0 comments on commit 483a201

Please sign in to comment.