change cash

This commit is contained in:
2025-10-16 14:25:18 +03:00
parent fc1da26055
commit 31eccd5c09

View File

@@ -69,9 +69,10 @@ jobs:
- name: Restore Docker layer cache
uses: actions/cache/restore@v4
with:
path: /cache/buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /cache/${{ github.repository }}/buildx-cache
key: ${{ runner.os }}-${{ github.repository }}-buildx-${{ hashFiles('Dockerfile', '**/requirements.txt', '**/*lock*', '**/package-lock.json', '**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ github.repository }}-buildx-
${{ runner.os }}-buildx-
- name: Build and push multi-arch image
@@ -90,17 +91,18 @@ jobs:
build-args: |
GIT_COMMIT=${{ github.sha }}
cache-from: |
type=local,src=/cache/buildx-cache
type=local,src=/cache/${{ github.repository }}/buildx-cache
cache-to: |
type=local,dest=/cache/buildx-cache-new,mode=max
type=local,dest=/cache/${{ github.repository }}/buildx-cache-new,mode=max
- name: Move new cache if it exists
if: always()
run: |
if [ -d /cache/buildx-cache-new ]; then
mkdir -p /cache/${{ github.repository }}
if [ -d /cache/${{ github.repository }}/buildx-cache-new ]; then
echo "Found new buildx cache, replacing old one..."
rm -rf /cache/buildx-cache
mv /cache/buildx-cache-new /cache/buildx-cache
rm -rf /cache/${{ github.repository }}/buildx-cache
mv /cache/${{ github.repository }}/buildx-cache-new /cache/${{ github.repository }}/buildx-cache
else
echo "No new buildx cache found, keeping old one."
fi
@@ -109,8 +111,8 @@ jobs:
if: always()
uses: actions/cache/save@v4
with:
path: /cache/buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /cache/${{ github.repository }}/buildx-cache
key: ${{ runner.os }}-${{ github.repository }}-buildx-${{ hashFiles('Dockerfile', '**/requirements.txt', '**/*lock*', '**/package-lock.json', '**/poetry.lock') }}
- name: Notify (result)
if: always()