Build caching

This commit is contained in:
2024-12-10 19:07:50 -05:00
parent 2c04a329c8
commit 1edc20193c

View File

@@ -16,6 +16,31 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker images
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Load cached Docker image
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ghcr.io/xu-cheng/texlive-full:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Create public info file
env:
PERSONAL_NAME: ${{ secrets.PERSONAL_NAME || github.repository_owner }}
@@ -62,8 +87,7 @@ jobs:
- name: Move PDFs to root
run: |
cp /home/runner/work/resume-cv/resume-cv/resume.pdf ./resume.pdf
cp /home/runner/work/resume-cv/resume-cv/cv.pdf ./cv.pdf
ls -la *.pdf
- name: Delete existing tag
continue-on-error: true