Support multiple unarchived file uploads

This commit is contained in:
2026-05-05 18:23:13 +03:00
parent 227b403105
commit 8b22fe549b
4 changed files with 39 additions and 18 deletions
+17 -7
View File
@@ -2,21 +2,31 @@
A Gitea-compatible vendored copy of `actions/upload-artifact@v7.0.1`.
The bundled `dist/upload/index.js` is patched so `isGhes()` returns `false`.
Gitea sets `GITHUB_SERVER_URL` to the Gitea instance URL, which upstream
`actions/upload-artifact@v7` mis-detects as GitHub Enterprise Server and rejects
before it can use Gitea's artifact runtime service.
The bundled `dist/upload/index.js` includes two Gitea patches:
1. `isGhes()` returns `false`. Gitea sets `GITHUB_SERVER_URL` to the Gitea
instance URL, which upstream `actions/upload-artifact@v7` mis-detects as
GitHub Enterprise Server and rejects before it can use Gitea's artifact
runtime service.
2. `archive: false` accepts multiple matched files. Upstream v7 only permits one
unarchived file; this fork uploads every matched file as a separate
unarchived artifact named after that file's basename.
## Usage
```yaml
- uses: mo7sen/upload-artifact-gitea@v7
- uses: https://git.neosisyphus.com/mo7sen/upload-artifact-gitea@v7
with:
name: meson-log.txt
path: build/meson-logs/meson-log.txt
path: |
build/meson-logs/meson-log.txt
build/meson-logs/testlog.txt
archive: false
```
With `archive: false`, each matched file is uploaded unzipped as its own
artifact. The artifact name is the file basename, so `name` is ignored in this
mode.
## Upstream
Based on <https://github.com/actions/upload-artifact/releases/tag/v7.0.1>.