Git Product home page Git Product logo

latexmk-action's Introduction

Latexmk Github Action

test License

To latexmk your LaTeX document by GitHub Action just create a .github/workflows/latexmk.yml file:

name: latexmk
on:
  push:
jobs:
  latexmk:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v2
      - uses: yegor256/[email protected]
        with:
          cmd: latexmk
          path: foo
          opts: -pdf
          packages: acmart tikz

Preferrably, you should have .latexmkrc in the foo directory of your repository, which configures the behavior of latexmk. If you don't have special requirements in your project, and just need to compile a .tex file, skip the config, everything should work out of the box.

The options available (provided via the with YAML element):

  • cmd is the command to run (default is latexmk)
  • path is a relative path of the directory with .tex file(s)
  • opts is the options to pass to latexmk
  • packages is a space-separated list of TeXLive package to install from CTAN
  • depends is a file with TeXLive packages, as CTAN expects them

How to Contribute

In order to test this action, just run:

make test

This should build a new Docker image and then try to use it in order to render a simple test.tex document. You need to have Docker installed.

latexmk-action's People

Contributors

apotyomkin avatar renovate[bot] avatar rultor avatar yegor256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

latexmk-action's Issues

tlmgr: Local TeX Live (2021) is older than remote repository (2022).

First, thanks for this great action. I use it a lot on a daily basis!

Today I started to get this build error in one of my repos using this action:

  tlmgr: Local TeX Live (2021) is older than remote repository (2022).
  Cross release updates are only supported with
    update-tlmgr-latest(.sh/.exe) --update
  See https://tug.org/texlive/upgrade.html for details.
  The command '/bin/sh -c tlmgr --verify-repo=none update --self' returned a non-zero code: 1
  
  Warning: Docker build failed with exit code 1, back off 3.531 seconds before retry.

This should originate from this line in the Dockerfile:

RUN tlmgr --verify-repo=none update --self

Here's an example of a build in a public repo that fails:
https://github.com/erikw/resume/runs/5828710504?check_suite_focus=true

How could we update Tex Live to the 2020 version?

`tlmgr` error as wrong turn is taken in `entry.sh`

entry.sh takes the [[ "${INPUT_PACKAGES}" ]] branch when no packages are asked for:

Run yegor256/[email protected]
/usr/bin/docker run --name bedb44097556853054cbab937cb83d77f516c_3ec1e1 --label 5bedb4 --workdir /github/workspace --rm -e "INPUT_PATH" -e "INPUT_CMD" -e "INPUT_OPTS" -e "INPUT_PACKAGES" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/dotdepth/dotdepth":"/github/workspace" 5bedb4:4097556853054cbab937cb83d77f516c
+ set -e
+ cd /github/workspace
+ cd .
+ [[ -n   ]]
+ tlmgr --verify-repo=none update --self
tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr: saving backups to /usr/local/texlive/2023/tlpkg/backups
tlmgr: no self-updates for tlmgr available
+ tlmgr --verify-repo=none update
tlmgr update: specify --list, --all, --self, or a list of package names.
tlmgr: An error has occurred. See above messages. Exiting.

I suspect this is due to its default value as ' ':

https://github.com/yegor256/latexmk-action/blob/3a7cee7bd188db124926d191117f73d370a010f5/action.yml#L47C5-L47C5

For reference, here's the workflow:

name: Build LaTeX document
on: [push]
jobs:
  build_latex:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v3
      - name: Compile LaTeX document
        uses: yegor256/[email protected]
      - name: Upload PDF file
        uses: actions/upload-artifact@v3
        with:
          name: PDF
          path: _build/main.pdf

tlmgr: Local TeX Live (2022) is older than remote repository (2023)

Hi there, I'm trying to use this GitHub Action in my project as such:

name: build_check

on:
  pull_request:
    branches: [main]

jobs:
  build_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: sergeysova/jq-action@v2
      - uses: actions/setup-node@v3
        with:
          node-version: 18

      - name: latexmk-action
        uses: yegor256/[email protected]
        with:
          cmd: latexmk
          path: src/cv/tex/
          opts: -pdf
          packages: acmart tikz

when run in Actions, it produces this error:
tlmgr: Local TeX Live (2022) is older than remote repository (2023)

Among the results when searching that error is https://tex.stackexchange.com/questions/540429/tlmgr-in-ubuntu-20-04-local-tex-live-2019-is-older-than-remote-repository-2 which might be of help addressing this issue. Please let me know if you need more information to repro this issue.

Thanks

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
Dockerfile
  • yegor256/rultor-image 1.23.1
github-actions
.github/workflows/markdown-lint.yml
  • actions/checkout 44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
  • articulate/actions-markdownlint v1
  • ubuntu 22.04
.github/workflows/shellcheck.yml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/test.yml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/up.yml
  • actions/checkout v4
  • peter-evans/create-pull-request v6
  • ubuntu 22.04

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.