Skip to content

Artifacts downloading to wrong path #26700

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

Closed
plinss opened this issue Aug 24, 2023 · 2 comments
Closed

Artifacts downloading to wrong path #26700

plinss opened this issue Aug 24, 2023 · 2 comments
Labels

Comments

@plinss
Copy link

plinss commented Aug 24, 2023

Description

When uploading/download artifacts that originate in directories, the downloaded artifact paths do not match the results when the same workflow is run on GitHub.

Sample workflow:

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Make some test files
        run: |
          mkdir test
          echo "testing" > test/test_file1.md
          echo "testing" > test/test_file2.md

      - uses: actions/upload-artifact@v3
        with:
          name: test
          path: test/*

      - name: Make some more test files
        run: |
          mkdir docs
          echo "testing" > docs/docs_file1.md
          echo "testing" > docs/docs_file2.md

      - uses: actions/upload-artifact@v3
        with:
          name: docs
          path: docs/*

  test_all:
    runs-on: ubuntu-latest

    needs:
      - build
      
    steps:
      - uses: actions/download-artifact@v3
      - run: ls -al 
      - run: ls -al test
      - run: ls -al docs

  test:
    runs-on: ubuntu-latest

    needs:
      - build

    steps:
      - uses: actions/download-artifact@v3
        with:
          name: test

      - uses: actions/download-artifact@v3
        with:
          name: docs

      - run: ls -al

You can see the same at: https://github.com/plinss/action_test

For the test job, GitHub dowloads all the artifact files into the current directory, on my Gitea instance, the files download into test and docs directories.

For the test_all job, GitHub creates the directories test and docs containing the respective files. Gitea creates the files in test/test and docs/docs respectively.

I also notice that if I download the artifacts directly from the UI, GitHub gives me a .zip file containing the artifact files. Gitea gives me a file called test (or docs) that contains the contents of one of the uploaded artifacts.

I'm running act_runner v0.2.5

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/plinss/3091bd66a7f98c09764b118b2061ef8e

Screenshots

No response

Git Version

2.39.2

Operating System

debain

How are you running Gitea?

Built from source via: TAGS="bindata" LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea\"" make build

Database

PostgreSQL

@fuxiaohei
Copy link
Contributor

Is stable version 1.20.3 ? In 1.20.x, Artifact implement single file uploading and downloading.

Directory support implements at PR #24874 and It would release at 1.21.0. It provides zip download in UI page too.

I test nightly version, It shows same result in github actions https://github.com/fuxiaohei/action_test/actions/runs/5961122538

github gitea
test_all image image image image
test image image

You can try the latest main branch.

@plinss
Copy link
Author

plinss commented Aug 25, 2023

Confirmed working on current main branch. I had seen the PR for multiple file support but presumed it had landed prior to 1.20.3, sorry for the noise.

@plinss plinss closed this as completed Aug 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants