Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting output arg does not write results to disk #216

Closed
onedr0p opened this issue Dec 26, 2023 · 4 comments
Closed

Setting output arg does not write results to disk #216

onedr0p opened this issue Dec 26, 2023 · 4 comments

Comments

@onedr0p
Copy link

onedr0p commented Dec 26, 2023

Hi 馃憢馃徏

I have the action set up like this, however it always fails on the Print Output step because it cannot find /tmp/results.md. I've tried setting the output arg to ./lychee/results.md as well but that still does not work. For some reason it seems like the action is not writing the output to the file, meanwhile I see the results in stdout.

      - name: Checkout Default Branch
        uses: actions/checkout@v4

      - name: Scan For Broken Links
        uses: lycheeverse/lychee-action@v1
        with:
          args: --verbose --no-progress --exclude-mail './**/*.md'
          format: markdown
          output: /tmp/results.md

      - name: Print Output
        run: cat /tmp/results.md

      - name: Find Link Checker Issue
        id: find-issue
        shell: bash
        run: |
          issue_number=$( \
              gh issue list \
                  --search "in:title ${{ env.WORKFLOW_ISSUE_TITLE }}" \
                  --state open \
                  --json number \
                  | jq --raw-output '.[0].number' \
          )
          echo "issue-number=${issue_number}" >> $GITHUB_OUTPUT
          echo "${issue_number}"

      - name: Create or Update Issue
        uses: peter-evans/create-issue-from-file@v4
        with:
          title: "${{ env.WORKFLOW_ISSUE_TITLE }}"
          issue-number: "${{ steps.find-issue.outputs.issue-number || '' }}"
          content-filepath: /tmp/results.md
Run cat results.md
  cat results.md
  shell: /usr/bin/bash -e {0}
  env:
    WORKFLOW_ISSUE_TITLE: Link Checker Dashboard 馃敆
    lychee_exit_code: 0
cat: /tmp/results.md: No such file or directory
Error: Process completed with exit code 1.
@onedr0p onedr0p changed the title Setting output arg does not work Setting output arg does not write results to disk Dec 26, 2023
@tooomm
Copy link
Contributor

tooomm commented Dec 27, 2023

I ran into the same issue! You probably want to add to #214.

There is a potential fix already suggested in a PR as well. 馃憤

@mre
Copy link
Member

mre commented Dec 28, 2023

@tooomm, have you tried the fix in the mentioned PR?

@tooomm
Copy link
Contributor

tooomm commented Dec 29, 2023

Nope. Will also not get around to it for now.

@mre
Copy link
Member

mre commented Jan 5, 2024

This should be fixed in master now.
See #214, #215, #217.

@mre mre closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants