Uploaded artifacts should be overwritten #12241

Closed
opened 2025-11-02 10:03:04 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @hakito on GitHub (Dec 20, 2023).

Originally assigned to: @fuxiaohei on GitHub.

Description

According to github documentation artifacts sharing the same name should be overwritten.

Gitea seems to discard/ignore the second upload. Here is an example workflow:

name: Uploads
on:
  - push

jobs:
  first:
    name: upload first
    runs-on: windows
    steps:
      - run: echo "first" > actual
      - uses: actions/upload-artifact@v3
        with:
          name: actual
          path: actual
  second:
    needs: [first]
    name: upload second
    runs-on: windows
    steps:
      - run: echo "second" > actual
      - uses: actions/upload-artifact@v3
        with:
          name: actual
          path: actual
  verify:
    needs: [second]
    name: Verify contents
    runs-on: windows
    steps:
      - name: Fetch Integration Tests from Build
        uses: actions/download-artifact@v3
        with:
          name: actual
      - run: echo "second" > expected
      - run: fc.exe expected actual

Gitea Version

1.21.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

gitea/gitea:latest

Database

MySQL/MariaDB

Originally created by @hakito on GitHub (Dec 20, 2023). Originally assigned to: @fuxiaohei on GitHub. ### Description According to github documentation[ artifacts sharing the same name should be overwritten](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow). Gitea seems to discard/ignore the second upload. Here is an example workflow: ```yaml name: Uploads on: - push jobs: first: name: upload first runs-on: windows steps: - run: echo "first" > actual - uses: actions/upload-artifact@v3 with: name: actual path: actual second: needs: [first] name: upload second runs-on: windows steps: - run: echo "second" > actual - uses: actions/upload-artifact@v3 with: name: actual path: actual verify: needs: [second] name: Verify contents runs-on: windows steps: - name: Fetch Integration Tests from Build uses: actions/download-artifact@v3 with: name: actual - run: echo "second" > expected - run: fc.exe expected actual ``` ### Gitea Version 1.21.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/320853/3bf2f460-6a9f-4760-974d-cee456be8469) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? gitea/gitea:latest ### Database MySQL/MariaDB
GiteaMirror added the topic/gitea-actionstype/bug labels 2025-11-02 10:03:04 -06:00
Author
Owner

@hakito commented on GitHub (Dec 20, 2023):

Side note:

We are currently migrating our build system to gitea, and this could have become a critical problem.

We first build our software and upload the binaries. In a second job we overwrite the encrypted binaries. If I hadn't checked manually, the unencrypted version would be shipped!

@hakito commented on GitHub (Dec 20, 2023): Side note: We are currently migrating our build system to gitea, and this could have become a critical problem. We first build our software and upload the binaries. In a second job we overwrite the encrypted binaries. If I hadn't checked manually, the unencrypted version would be shipped!
Author
Owner

@lunny commented on GitHub (Dec 20, 2023):

Can you run that on github successfully?

@lunny commented on GitHub (Dec 20, 2023): Can you run that on github successfully?
Author
Owner

@hakito commented on GitHub (Dec 20, 2023):

Yes https://github.com/hakito/Activity/actions/runs/7274027094/job/19819139031

Only adapted the label name to Windows

@hakito commented on GitHub (Dec 20, 2023): Yes https://github.com/hakito/Activity/actions/runs/7274027094/job/19819139031 Only adapted the label name to `Windows`
Author
Owner

@hakito commented on GitHub (Dec 28, 2023):

FYI - Also when re-running a job it keeps the old artifacts.

@hakito commented on GitHub (Dec 28, 2023): FYI - Also when re-running a job it keeps the old artifacts.
Author
Owner

@lunny commented on GitHub (Dec 28, 2023):

FYI - Also when re-running a job it keeps the old artifacts.

Wow, so this is a bug?

@lunny commented on GitHub (Dec 28, 2023): > FYI - Also when re-running a job it keeps the old artifacts. Wow, so this is a bug?
Author
Owner

@hakito commented on GitHub (Dec 29, 2023):

Well I would consider it a bug if I successfully upload an artifact (with re-run), but the artifact is not the uploaded. I made a very simple example do demonstrate it:

on: [push]
jobs:
  Timestamp:
    runs-on: [windows]
    steps:
      - run: get-date -Format "o" > timestamp.txt
      - run: cat timestamp.txt
      - uses: actions/upload-artifact@v3
        with:
            path: timestamp.txt           

Simply run the job a 2nd time manually. After the 2nd run the output of cat timestamp.txt in web interface is:

2023-12-29T08:17:55.7576776+01:00

But the content of the downloaded artifact is:

2023-12-29T08:17:03.1341990+01:00

@hakito commented on GitHub (Dec 29, 2023): Well I would consider it a bug if I successfully upload an artifact (with re-run), but the artifact is not the uploaded. I made a very simple example do demonstrate it: ```yaml on: [push] jobs: Timestamp: runs-on: [windows] steps: - run: get-date -Format "o" > timestamp.txt - run: cat timestamp.txt - uses: actions/upload-artifact@v3 with: path: timestamp.txt ``` Simply run the job a 2nd time manually. After the 2nd run the output of `cat timestamp.txt` in web interface is: > 2023-12-29T08:17:55.7576776+01:00 But the content of the downloaded artifact is: > 2023-12-29T08:17:03.1341990+01:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 28, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Feb 28, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12241