Skip to content

Commit

Permalink
Merge pull request #6 from orensbruli/feature/use_ghcr_docker_image
Browse files Browse the repository at this point in the history
use GHCR docker image
  • Loading branch information
orensbruli authored Jan 17, 2024
2 parents 8c5f1db + 7a8e2f0 commit 4b32765
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/github_action_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker Image
run: |
docker buildx build \
--load \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
-t latex-build .
# This step is replaced by pulling the image from GHCR
- name: Pull Docker Image from GHCR
run: docker pull ghcr.io/${{ github.repository_owner }}/latex-build:latest

- name: Run Docker Container
run: docker run -v $(pwd):/latex_content --name latex-container latex-build /bin/sh -c "make pdf"
run: docker run -v $(pwd):/latex_content --name latex-container ghcr.io/${{ github.repository_owner }}/latex-build:latest /bin/sh -c "make pdf"

- name: Copy PDF from Docker Container
run: docker cp latex-container:/latex_content/rendered.pdf output.pdf
Expand Down

0 comments on commit 4b32765

Please sign in to comment.