-
Notifications
You must be signed in to change notification settings - Fork 683
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
Unable to upload a folder as an artifact #248
Comments
My config looking like this has worked - uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-artifacts
path: |
cypress/screenshots/
cypress/videos/ I think there also has to be things in the folder or it'll skip it |
Is this still a thing? I believe the problem here is that this action won't upload files that are |
I had a similar problem with my workflow. However the problem in my case was that I thought by setting a default value for the working directory it should be applied in all steps, but it only applies on the run steps. So for the upload-artifact action I had to include the complete path from the root of the repository, like this: jobs:
run-playwright-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tests/e2e
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: |
tests/e2e/playwright-report/
retention-days: 15 |
Ah, yeah. That's what I ultimately discovered, as well. The action doesn't respect |
Here is a simple workaround, add one more step, just before the ...
...
- run: mkdir tmp-dir && mv dist tmp-dir/ && mv tmp-dir dist
- name: Uploading dist
uses: actions/upload-artifact@v2
with:
name: artefact
path: ./dist
...
... |
It seems impossible to upload a specific folder as an artifact. In my case, I'd like to simply upload the directory
dist
instead of its content. My code is similar to this example.I tried another variations using wildcards but I didn't succeed uploading the
dist
within my artifact.Isn't possible with this action?
The text was updated successfully, but these errors were encountered: