Skip to content

Commit f780069

Browse files
committed
first pass on README
1 parent 77c9534 commit f780069

File tree

1 file changed

+25
-96
lines changed

1 file changed

+25
-96
lines changed

README.md

+25-96
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,17 @@
1-
# `@actions/upload-artifact`
1+
# `namespace-actions/upload-artifact`
22

3-
Upload [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) from your Workflow Runs. Internally powered by [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package.
3+
Namespace's version of Upload [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) compatible with the [upload-artifact](https://github.com/actions/upload-artifact).
44

5-
See also [download-artifact](https://github.com/actions/download-artifact).
5+
The artifacts are stored in Namespace internal storage. They will not be visible and billed in GitHub.
66

7-
- [`@actions/upload-artifact`](#actionsupload-artifact)
8-
- [v4 - What's new](#v4---whats-new)
9-
- [Improvements](#improvements)
10-
- [Breaking Changes](#breaking-changes)
11-
- [Usage](#usage)
12-
- [Inputs](#inputs)
13-
- [Outputs](#outputs)
14-
- [Examples](#examples)
15-
- [Upload an Individual File](#upload-an-individual-file)
16-
- [Upload an Entire Directory](#upload-an-entire-directory)
17-
- [Upload using a Wildcard Pattern](#upload-using-a-wildcard-pattern)
18-
- [Upload using Multiple Paths and Exclusions](#upload-using-multiple-paths-and-exclusions)
19-
- [Altering compressions level (speed v. size)](#altering-compressions-level-speed-v-size)
20-
- [Customization if no files are found](#customization-if-no-files-are-found)
21-
- [(Not) Uploading to the same artifact](#not-uploading-to-the-same-artifact)
22-
- [Environment Variables and Tilde Expansion](#environment-variables-and-tilde-expansion)
23-
- [Retention Period](#retention-period)
24-
- [Using Outputs](#using-outputs)
25-
- [Example output between steps](#example-output-between-steps)
26-
- [Example output between jobs](#example-output-between-jobs)
27-
- [Overwriting an Artifact](#overwriting-an-artifact)
28-
- [Limitations](#limitations)
29-
- [Number of Artifacts](#number-of-artifacts)
30-
- [Zip archives](#zip-archives)
31-
- [Permission Loss](#permission-loss)
32-
- [Where does the upload go?](#where-does-the-upload-go)
33-
34-
35-
## v4 - What's new
36-
37-
> [!IMPORTANT]
38-
> upload-artifact@v4+ is not currently supported on GHES yet. If you are on GHES, you must use [v3](https://github.com/actions/upload-artifact/releases/tag/v3).
39-
40-
The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.
41-
42-
For more information, see the [`@actions/artifact`](https://github.com/actions/toolkit/tree/main/packages/artifact) documentation.
43-
44-
There is also a new sub-action, `actions/upload-artifact/merge`. For more info, check out that action's [README](./merge/README.md).
45-
46-
### Improvements
47-
48-
1. Uploads are significantly faster, upwards of 90% improvement in worst case scenarios.
49-
2. Once uploaded, an Artifact ID is returned and Artifacts are immediately available in the UI and [REST API](https://docs.github.com/en/rest/actions/artifacts). Previously, you would have to wait for the run to be completed before an ID was available or any APIs could be utilized.
50-
3. The contents of an Artifact are uploaded together into an _immutable_ archive. They cannot be altered by subsequent jobs unless the Artifacts are deleted and recreated (where they will have a new ID). Both of these factors help reduce the possibility of accidentally corrupting Artifact files.
51-
4. The compression level of an Artifact can be manually tweaked for speed or size reduction.
52-
53-
### Breaking Changes
54-
55-
1. On self hosted runners, additional [firewall rules](https://github.com/actions/toolkit/tree/main/packages/artifact#breaking-changes) may be required.
56-
2. Uploading to the same named Artifact multiple times.
57-
58-
Due to how Artifacts are created in this new version, it is no longer possible to upload to the same named Artifact multiple times. You must either split the uploads into multiple Artifacts with different names, or only upload once. Otherwise you _will_ encounter an error.
59-
60-
3. Limit of Artifacts for an individual job. Each job in a workflow run now has a limit of 500 artifacts.
61-
62-
For assistance with breaking changes, see [MIGRATION.md](docs/MIGRATION.md).
7+
Download artifacts with [download-artifact](https://github.com/namespace-actions/download-artifact).
638

649
## Usage
6510

6611
### Inputs
6712

6813
```yaml
69-
- uses: actions/upload-artifact@v4
14+
- uses: namespace-actions/upload-artifact@v0
7015
with:
7116
# Name of the artifact to upload.
7217
# Optional. Default is 'artifact'
@@ -118,7 +63,7 @@ For assistance with breaking changes, see [MIGRATION.md](docs/MIGRATION.md).
11863
steps:
11964
- run: mkdir -p path/to/artifact
12065
- run: echo hello > path/to/artifact/world.txt
121-
- uses: actions/upload-artifact@v4
66+
- uses: namespace-actions/upload-artifact@v0
12267
with:
12368
name: my-artifact
12469
path: path/to/artifact/world.txt
@@ -127,7 +72,7 @@ steps:
12772
### Upload an Entire Directory
12873

12974
```yaml
130-
- uses: actions/upload-artifact@v4
75+
- uses: namespace-actions/upload-artifact@v0
13176
with:
13277
name: my-artifact
13378
path: path/to/artifact/ # or path/to/artifact
@@ -136,7 +81,7 @@ steps:
13681
### Upload using a Wildcard Pattern
13782

13883
```yaml
139-
- uses: actions/upload-artifact@v4
84+
- uses: namespace-actions/upload-artifact@v0
14085
with:
14186
name: my-artifact
14287
path: path/**/[abc]rtifac?/*
@@ -145,7 +90,7 @@ steps:
14590
### Upload using Multiple Paths and Exclusions
14691

14792
```yaml
148-
- uses: actions/upload-artifact@v4
93+
- uses: namespace-actions/upload-artifact@v0
14994
with:
15095
name: my-artifact
15196
path: |
@@ -193,7 +138,7 @@ For instance, if you are uploading random binary data, you can save a lot of tim
193138
- name: Make a 1GB random binary file
194139
run: |
195140
dd if=/dev/urandom of=my-1gb-file bs=1M count=1000
196-
- uses: actions/upload-artifact@v4
141+
- uses: namespace-actions/upload-artifact@v0
197142
with:
198143
name: my-artifact
199144
path: my-1gb-file
@@ -206,7 +151,7 @@ But, if you are uploading data that is easily compressed (like plaintext, code,
206151
- name: Make a file with a lot of repeated text
207152
run: |
208153
for i in {1..100000}; do echo -n 'foobar' >> foobar.txt; done
209-
- uses: actions/upload-artifact@v4
154+
- uses: namespace-actions/upload-artifact@v0
210155
with:
211156
name: my-artifact
212157
path: foobar.txt
@@ -218,7 +163,7 @@ But, if you are uploading data that is easily compressed (like plaintext, code,
218163
If a path (or paths), result in no files being found for the artifact, the action will succeed but print out a warning. In certain scenarios it may be desirable to fail the action or suppress the warning. The `if-no-files-found` option allows you to customize the behavior of the action if no files are found:
219164

220165
```yaml
221-
- uses: actions/upload-artifact@v4
166+
- uses: namespace-actions/upload-artifact@v0
222167
with:
223168
name: my-artifact
224169
path: path/to/artifact/
@@ -227,17 +172,17 @@ If a path (or paths), result in no files being found for the artifact, the actio
227172

228173
### (Not) Uploading to the same artifact
229174

230-
Unlike earlier versions of `upload-artifact`, uploading to the same artifact via multiple jobs is _not_ supported with `v4`.
175+
Uploading to the same artifact via multiple jobs is _not_ supported.
231176

232177
```yaml
233178
- run: echo hi > world.txt
234-
- uses: actions/upload-artifact@v4
179+
- uses: namespace-actions/upload-artifact@v0
235180
with:
236181
# implicitly named as 'artifact'
237182
path: world.txt
238183

239184
- run: echo howdy > extra-file.txt
240-
- uses: actions/upload-artifact@v4
185+
- uses: namespace-actions/upload-artifact@v0
241186
with:
242187
# also implicitly named as 'artifact', will fail here!
243188
path: extra-file.txt
@@ -263,7 +208,7 @@ jobs:
263208
- name: Build
264209
run: ./some-script --version=${{ matrix.version }} > my-binary
265210
- name: Upload
266-
uses: actions/upload-artifact@v4
211+
uses: namespace-actions/upload-artifact@v0
267212
with:
268213
name: binary-${{ matrix.os }}-${{ matrix.version }}
269214
path: my-binary
@@ -281,7 +226,7 @@ You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expan
281226
- run: |
282227
mkdir -p ~/new/artifact
283228
echo hello > ~/new/artifact/world.txt
284-
- uses: actions/upload-artifact@v4
229+
- uses: namespace-actions/upload-artifact@v0
285230
with:
286231
name: my-artifacts
287232
path: ~/new/**/*
@@ -296,7 +241,7 @@ Environment variables along with context expressions can also be used for input.
296241
- run: |
297242
mkdir -p ${{ github.workspace }}/artifact
298243
echo hello > ${{ github.workspace }}/artifact/world.txt
299-
- uses: actions/upload-artifact@v4
244+
- uses: namespace-actions/upload-artifact@v0
300245
with:
301246
name: ${{ env.name }}-name
302247
path: ${{ github.workspace }}/artifact/**/*
@@ -310,7 +255,7 @@ For environment variables created in other steps, make sure to use the `env` exp
310255
mkdir testing
311256
echo "This is a file to upload" > testing/file.txt
312257
echo "artifactPath=testing/file.txt" >> $GITHUB_ENV
313-
- uses: actions/upload-artifact@v4
258+
- uses: namespace-actions/upload-artifact@v0
314259
with:
315260
name: artifact
316261
path: ${{ env.artifactPath }} # this will resolve to testing/file.txt at runtime
@@ -325,7 +270,7 @@ Artifacts are retained for 90 days by default. You can specify a shorter retenti
325270
run: echo "I won't live long" > my_file.txt
326271
327272
- name: Upload Artifact
328-
uses: actions/upload-artifact@v4
273+
uses: namespace-actions/upload-artifact@v0
329274
with:
330275
name: my-artifact
331276
path: my_file.txt
@@ -341,7 +286,7 @@ If an artifact upload is successful then an `artifact-id` output is available. T
341286
#### Example output between steps
342287

343288
```yml
344-
- uses: actions/upload-artifact@v4
289+
- uses: namespace-actions/upload-artifact@v0
345290
id: artifact-upload-step
346291
with:
347292
name: my-artifact
@@ -360,7 +305,7 @@ jobs:
360305
outputs:
361306
output1: ${{ steps.artifact-upload-step.outputs.artifact-id }}
362307
steps:
363-
- uses: actions/upload-artifact@v4
308+
- uses: namespace-actions/upload-artifact@v0
364309
id: artifact-upload-step
365310
with:
366311
name: my-artifact
@@ -386,7 +331,7 @@ jobs:
386331
- name: Create a file
387332
run: echo "hello world" > my-file.txt
388333
- name: Upload Artifact
389-
uses: actions/upload-artifact@v4
334+
uses: namespace-actions/upload-artifact@v0
390335
with:
391336
name: my-artifact # NOTE: same artifact name
392337
path: my-file.txt
@@ -397,7 +342,7 @@ jobs:
397342
- name: Create a different file
398343
run: echo "goodbye world" > my-file.txt
399344
- name: Upload Artifact
400-
uses: actions/upload-artifact@v4
345+
uses: namespace-actions/upload-artifact@v0
401346
with:
402347
name: my-artifact # NOTE: same artifact name
403348
path: my-file.txt
@@ -406,12 +351,6 @@ jobs:
406351

407352
## Limitations
408353

409-
### Number of Artifacts
410-
411-
Within an individual job, there is a limit of 500 artifacts that can be created for that job.
412-
413-
You may also be limited by Artifacts if you have exceeded your shared storage quota. Storage is calculated every 6-12 hours. See [the documentation](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending) for more info.
414-
415354
### Zip archives
416355

417356
When an Artifact is uploaded, all the files are assembled into an immutable Zip archive. There is currently no way to download artifacts in a format other than a Zip or to download individual artifact contents.
@@ -427,18 +366,8 @@ If you must preserve permissions, you can `tar` all of your files together befor
427366
run: tar -cvf my_files.tar /path/to/my/directory
428367
429368
- name: 'Upload Artifact'
430-
uses: actions/upload-artifact@v4
369+
uses: namespace-actions/upload-artifact@v0
431370
with:
432371
name: my-artifact
433372
path: my_files.tar
434373
```
435-
436-
## Where does the upload go?
437-
438-
At the bottom of the workflow summary page, there is a dedicated section for artifacts. Here's a screenshot of something you might see:
439-
440-
<img src="https://user-images.githubusercontent.com/16109154/103645952-223c6880-4f59-11eb-8268-8dca6937b5f9.png" width="700" height="300">
441-
442-
There is a trashcan icon that can be used to delete the artifact. This icon will only appear for users who have write permissions to the repository.
443-
444-
The size of the artifact is denoted in bytes. The displayed artifact size denotes the size of the zip that `upload-artifact` creates during upload.

0 commit comments

Comments
 (0)