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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The documentation says that relative paths are allowed, but they aren’t #176

Open
2 of 6 tasks
leafac opened this issue Feb 15, 2021 · 7 comments
Open
2 of 6 tasks
Labels
bug Something isn't working

Comments

@leafac
Copy link

leafac commented Feb 15, 2021

Describe the bug
A clear and concise description of what the bug is.

Compare the documentation:

Relative and absolute file paths are both allowed.

To what actually happens:

  with:
    path: ../courselore.zip
Error: Invalid pattern '../courselore.zip'. Relative pathing '.' and '..' is not allowed.

Version

  • V1
  • V2

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

Screenshots
If applicable, add screenshots to help explain your problem.

Run/Repo Url
If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.

How to reproduce
If applicable, add information on how to reproduce the problem.

Additional context
Add any other context about the problem here.

@leafac leafac added the bug Something isn't working label Feb 15, 2021
@hannesa2
Copy link

Same here

      - name: Upload
        uses: actions/upload-artifact@v2.2.3
        with: 
          name: ios_dist.tgz
          path: ../viro/ios/dist/

shows me

image

@flavienbwk
Copy link

Same problem for me.

@jjhartmann
Copy link

I'm running into this error as well.

@o01eg
Copy link

o01eg commented Oct 7, 2022

Would be nice if it will be fixed.

RadxaYuntian added a commit to radxa-pkg/rockchip-iqfiles that referenced this issue Dec 30, 2022
@RadxaYuntian
Copy link

Currently I have to use the following workaround to upload Debian package, which is created in parent folder by default:

      - name: Workaround actions/upload-artifact#176
        run: |
          echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV
      - name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: ${{ github.event.repository.name }}
          path: |
            ${{ env.artifacts_path }}/*.deb

RealOrangeOne added a commit to sourcebots/runusb that referenced this issue Jul 1, 2023
@id88
Copy link

id88 commented Oct 10, 2023

That's too bad. Why hasn't it been fixed yet

@wanosoft
Copy link

Same here!

datalogics-saharay added a commit to datalogics-saharay/apdfl-csharp-dotnet-samples that referenced this issue Mar 13, 2024
- The upload-artifact action supposedly supports relative paths, but
  it threw an error when relative paths were used. There also seems to
  be a few open bugs reported on GitHub, here's one: actions/upload-artifact#176.

- Since some of the samples dump their output in the parent directory, let's
  try a workaround to see if we can archive them in the workflow run.
datalogics-saharay added a commit to datalogics-saharay/apdfl-csharp-dotnet-samples that referenced this issue Mar 13, 2024
- The upload-artifact action supposedly supports relative paths, but
  it threw an error when relative paths were used. There also seems to
  be a few open bugs reported on GitHub, here's one: actions/upload-artifact#176.

- Since some of the samples dump their output in the parent directory, let's
  try a workaround to see if we can archive them in the workflow run.
joverlee521 added a commit to nextstrain/.github that referenced this issue Mar 15, 2024
The entire working directory gets zipped and uploaded to AWS Batch when
using the `aws-batch` runtime, which includes an early `build.log` file.
When the build completes and downloads the build outputs, the early
`build.log` file overwrites the local `build.log` of the GH Action.
This results in a truncated file that does not include the
AWS_BATCH_JOB_ID and prevents the generation of the AWS Batch summary.

This commit moves the hard-coded `build.log` file to outside of the
current working directory to prevent it from being uploaded with the
pathogen repo build.

Using "~/build.log" because "../build.log" is not allowed as a pattern
for the `upload-artifact`` action.¹

¹ actions/upload-artifact#176
joverlee521 added a commit to nextstrain/.github that referenced this issue Mar 15, 2024
The entire working directory gets zipped and uploaded to AWS Batch when
using the `aws-batch` runtime, which includes an early `build.log` file.
When the build completes and downloads the build outputs, the early
`build.log` overwrites the local `build.log` of the GH Action.
This results in a truncated file that does not include the
AWS_BATCH_JOB_ID and prevents the generation of the AWS Batch summary.

This commit moves the hard-coded `build.log` file to an ignored directory
(the same directory that we are using for the nextstrain/.github repo¹).
This prevents the `build.log` from being uploaded with the build.

Previously tried other paths, but they all caused errors.
- "../build.log" - ".." pattern is not allowed for the `upload-artifact` action²
- "~/build.log" - `hashfiles` requires files to be in the `GITHUB_WORKSPACE`³

¹ #44 (comment)
² actions/upload-artifact#176
³ https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles
joverlee521 added a commit to nextstrain/.github that referenced this issue Mar 15, 2024
The entire working directory gets zipped and uploaded to AWS Batch when
using the `aws-batch` runtime, which includes an early `build.log` file.
When the build completes and downloads the build outputs, the early
`build.log` overwrites the local `build.log` of the GH Action.
This results in a truncated file that does not include the
AWS_BATCH_JOB_ID and prevents the generation of the AWS Batch summary.

This commit moves the hard-coded `build.log` file to an ignored directory
(the same directory that we are using for the nextstrain/.github repo¹).
This prevents the `build.log` from being uploaded with the build.

Previously tried other paths, but they all caused errors.
- "../build.log" - ".." pattern is not allowed for the `upload-artifact` action²
- "~/build.log" - `hashfiles` requires files to be in the `GITHUB_WORKSPACE`³

¹ #44 (comment)
² actions/upload-artifact#176
³ https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles
joverlee521 added a commit to nextstrain/.github that referenced this issue Mar 15, 2024
The entire working directory gets zipped and uploaded to AWS Batch when
using the `aws-batch` runtime, which includes an early `build.log` file.
When the build completes and downloads the build outputs, the early
`build.log` overwrites the local `build.log` of the GH Action.
This results in a truncated file that does not include the
AWS_BATCH_JOB_ID and prevents the generation of the AWS Batch summary
and the re-attachment to the AWS Batch job in subsequent `wait` jobs.

This commit moves the hard-coded `build.log` file to an ignored directory
(the same directory that we are using for the nextstrain/.github repo¹).
This prevents the `build.log` from being uploaded with the build.

Previously tried other paths, but they all caused errors.
- "../build.log" - ".." pattern is not allowed for the `upload-artifact` action²
- "~/build.log" - `hashfiles` requires files to be in the `GITHUB_WORKSPACE`³

¹ #44 (comment)
² actions/upload-artifact#176
³ https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles
sebastianczech added a commit to PaloAltoNetworks/pan-os-codegen that referenced this issue Mar 25, 2024
luciansmith added a commit to sys-bio/roadrunner that referenced this issue May 10, 2024
Hopefully should work with node20?  Might need v4 for that.  Relative paths don't work, cf actions/upload-artifact#176
remarkablemark added a commit to remarkablegames/psych-101 that referenced this issue Jul 1, 2024
```
Error: Invalid pattern '../dist'. Relative pathing '.' and '..' is not allowed.
```

actions/upload-artifact#176
haichangsi added a commit to haichangsi/distributed-ranges that referenced this issue Jul 15, 2024
haichangsi added a commit to haichangsi/distributed-ranges that referenced this issue Jul 16, 2024
agottardo added a commit to tailscale/go that referenced this issue Sep 12, 2024
Update .github/workflows/build.yml to use v4s of the upload-artifact and download-artifact actions. Adds a workaround for actions/upload-artifact#176.

Co-authored-by: Mario Minardi <mminardi@shaw.ca>
agottardo added a commit to tailscale/go that referenced this issue Sep 12, 2024
Update .github/workflows/build.yml to use v4s of the upload-artifact and download-artifact actions. Adds a workaround for actions/upload-artifact#176. Adds a dependabot check for outdated GitHub Actions.

Co-authored-by: Mario Minardi <mminardi@shaw.ca>
bradfitz pushed a commit to tailscale/go that referenced this issue Sep 12, 2024
Update .github/workflows/build.yml to use v4s of the upload-artifact
and download-artifact actions. Adds a workaround for
actions/upload-artifact#176. Adds a dependabot check for outdated
GitHub Actions.

Co-authored-by: Mario Minardi <mminardi@shaw.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants