Skip to content

Commit 012dbd1

Browse files
authored
Drop caching built images between jobs (#159)
1 parent b647fbe commit 012dbd1

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ jobs:
9393
cache-to: type=gha,mode=max
9494
outputs: |
9595
type=image,push=${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
96-
type=oci,dest=${{ matrix.image }}.oci
97-
98-
- uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
99-
with:
100-
key: image-${{ matrix.image }}-${{ github.sha }}
101-
path: ${{ matrix.image }}.oci
10296
10397
list-examples:
10498
runs-on: ubuntu-latest
@@ -140,26 +134,28 @@ jobs:
140134
# will be created as needed in the examples.
141135
install_only: true
142136

143-
# import the images from the previous job from cache
144-
- run: sudo apt-get update -y && sudo apt-get install -y skopeo
145-
- uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
146-
with:
147-
key: image-resource-broker-${{ github.sha }}
148-
path: resource-broker.oci
149-
fail-on-cache-miss: true
150-
- run: skopeo copy --format v2s2 --multi-arch system oci-archive:resource-broker.oci:sha-${{ github.sha }} docker-daemon:resource-broker:dev
151-
- uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
152-
with:
153-
key: image-resource-broker-kcp-${{ github.sha }}
154-
path: resource-broker-kcp.oci
155-
fail-on-cache-miss: true
156-
- run: skopeo copy --format v2s2 --multi-arch system oci-archive:resource-broker-kcp.oci:sha-${{ github.sha }} docker-daemon:resource-broker-kcp:dev
157-
- uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
158-
with:
159-
key: image-resource-broker-operator-${{ github.sha }}
160-
path: resource-broker-operator.oci
161-
fail-on-cache-miss: true
162-
- run: skopeo copy --format v2s2 --multi-arch system oci-archive:resource-broker-operator.oci:sha-${{ github.sha }} docker-daemon:resource-broker-operator:dev
137+
# use the gha cache to "transfer" the images built in the previous job to this job
138+
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
139+
with:
140+
file: Dockerfile
141+
tags: resource-broker:dev
142+
cache-from: type=gha
143+
push: false
144+
load: true
145+
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
146+
with:
147+
file: contrib/kcp/Dockerfile
148+
tags: resource-broker-kcp:dev
149+
cache-from: type=gha
150+
push: false
151+
load: true
152+
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
153+
with:
154+
file: cmd/operator/Dockerfile
155+
tags: resource-broker-operator:dev
156+
cache-from: type=gha
157+
push: false
158+
load: true
163159

164160
- uses: ntnn/mdextract@e5a8798e279b2287fce907b7526dccf90ceeb8f7 # v0.3.0
165161
with:

0 commit comments

Comments
 (0)