Skip to content

Commit

Permalink
docker cache?
Browse files Browse the repository at this point in the history
  • Loading branch information
orensbruli committed Jan 4, 2024
1 parent b116f17 commit 4bd6769
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/github_action_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: LaTeX Build and Upload

on: [push, pull_request]
Expand All @@ -11,8 +10,24 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker Image
run: docker build -t latex-build .
run: |
docker buildx build \
--load \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t latex-build .
- name: Run Docker Container
run: docker run --name latex-container latex-build
Expand Down

0 comments on commit 4bd6769

Please sign in to comment.