Skip to content

Commit

Permalink
CI: setup to use the custom Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
anishshobithps committed Jan 11, 2025
1 parent a227293 commit 86e28ff
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,39 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # Required for creating releases and accessing repository contents
id-token: write # Required for authentication and access
actions: write # Required for workflow-related actions
contents: write
id-token: write
actions: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup TeX Live
uses: xu-cheng/latex-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and cache Docker image
uses: docker/build-push-action@v5
with:
root_file: main.tex
context: .docker
push: true
tags: ghcr.io/${{ github.repository }}/resume:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/resume:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/resume:buildcache,mode=max

- name: Rename Output File
- name: Build LaTeX document
run: |
mv main.pdf Anish_Shobith_P_S_Resume.pdf
docker run --rm -v ${{ github.workspace }}:/latex \
ghcr.io/${{ github.repository }}/resume:latest \
main.tex "Anish_Shobith_P_S_Resume.pdf"
- name: Create Release
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 86e28ff

Please sign in to comment.