Skip to content

Artifacts downloading to wrong path #26700

Closed
@plinss

Description

@plinss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions