ci/cd: added timestamp to cache name to ensure that the latest cache is always used

This commit is contained in:
antifallobst 2023-12-17 22:56:59 +01:00
parent f1782297a3
commit 7d8c727a3c
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
1 changed files with 5 additions and 1 deletions

View File

@ -17,12 +17,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get current time
id: timestamp
run: echo "::set-output name=now::$(date +"%s")"
- name: Cache Docker layers
uses: https://github.com/actions/cache/restore@v3
with:
path: |
/tmp/.buildx-cache
key: ${{ runner.os }}-buildx-admin_worker-${{ gitea.sha }}
key: ${{ runner.os }}-buildx-admin_worker-${{ ${{ steps.timestamp.outputs.now }} }}-${{ gitea.sha }}
restore-keys: |
${{ runner.os }}-buildx-admin_worker-