Skip to content

Commit d577156

Browse files
committed
Update build.yaml
1 parent 8d4e5a0 commit d577156

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,19 @@ jobs:
3131
run:
3232
./gen-rel-notes.sh > CHANGELOG
3333

34-
- name: Docker cache
35-
uses: ScribeMD/docker-cache@0.5.0
34+
- name: Cache Docker layers
35+
uses: actions/cache@v4
3636
with:
37-
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yaml') }}
37+
path: /tmp/.buildx-cache-app
38+
key: ${{ runner.os }}-buildx-app-${{ github.sha }}
39+
restore-keys: |
40+
${{ runner.os }}-buildx-app
3841
3942
- name: Build and push
4043
run: |
4144
cp tdei_uw.env .env
4245
echo "CODE_VERSION=${CODE_VERSION}" >> .env
43-
docker buildx bake -f docker-compose.build.yml --push
46+
docker buildx bake -f docker-compose.build.yml --push --set *.cache-from=type=local,src=/tmp/.buildx-cache-app --set *.cache-to=type=local,dest=/tmp/.buildx-cache-app-new,mode=max
4447
env:
4548
ENV: ${{ vars.ENV }}
4649
WS_DOCKER_REGISTRY: ${{ vars.WS_DOCKER_REGISTRY }}
@@ -54,6 +57,11 @@ jobs:
5457
WS_TASKS_DB_PASS: ${{ secrets.WS_TASKS_DB_PASS }}
5558
WS_TASKS_SECRET_KEY: ${{ secrets.WS_TASKS_SECRET_KEY }}
5659

60+
- name: Move cache
61+
run: |
62+
rm -rf /tmp/.buildx-cache-app # Remove the old cache.
63+
mv /tmp/.buildx-cache-app-new /tmp/.buildx-cache-app # Move the new cache to replace the old cache.
64+
5765
- name: Deploy
5866
env:
5967
ENV: ${{ vars.ENV }}

0 commit comments

Comments
 (0)