lycheeverse / lychee-action

Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
https://lychee.cli.rs
Apache License 2.0
318 stars 44 forks source link

With two lychee-action steps in a row you get -> tar: lychee: Cannot open: File exists #188

Closed CAMOBAP closed 1 year ago

CAMOBAP commented 1 year ago

Intro

I have a huge list of files to analyze and I decided to split URL and email validation to different steps

...
    - name: Run lychee for emails
      uses: lycheeverse/lychee-action@v1.6.1
      with:
        args: --no-progress --exclude "(https?)|(file)://" --cache --max-cache-age 1d '_site/**/*.html'
        fail: true

    - name: Run lychee for links
       with:
        args: --no-progress --exclude-mail --cache --max-cache-age 1d '_site/**/*.html'
        fail: true
...

Problem

In the second step, I get:

...
lychee
tar: lychee: Cannot open: File exists
tar: Exiting with failure status due to previous errors
Error: Process completed with exit code 2.
...

Probably it happens because tar has already been downloaded. Probably the right solution is to reuse existing tag/extracted files it they exists

Workaround

...
    - name: Run lychee for emails
      uses: lycheeverse/lychee-action@v1.6.1
      with:
        args: --no-progress --exclude "(https?)|(file)://" --cache --max-cache-age 1d '_site/**/*.html'
        fail: false

    - name: Run lychee for links
      run: lychee --no-progress --exclude-mail --cache --max-cache-age 1d '_site/**/*.html'
...
mre commented 1 year ago

My bad; I forgot to cleanup the tar archive in the installation step. Can you test again with uses: lycheeverse/lychee-action@master? If that works I'll cut a new release.