mirror of
https://code.forgejo.org/actions/upload-artifact.git
synced 2024-12-23 12:36:00 +01:00
Update readme from v2 preview to v2
This commit is contained in:
parent
f42ee54997
commit
f72ed18289
1 changed files with 10 additions and 10 deletions
20
README.md
20
README.md
|
@ -30,7 +30,7 @@ steps:
|
||||||
|
|
||||||
- run: echo hello > path/to/artifact/world.txt
|
- run: echo hello > path/to/artifact/world.txt
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
path: path/to/artifact/world.txt
|
path: path/to/artifact/world.txt
|
||||||
|
@ -39,7 +39,7 @@ steps:
|
||||||
### Upload an Entire Directory
|
### Upload an Entire Directory
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
path: path/to/artifact/ # or path/to/artifact
|
path: path/to/artifact/ # or path/to/artifact
|
||||||
|
@ -47,7 +47,7 @@ steps:
|
||||||
|
|
||||||
### Upload using a Wildcard Pattern:
|
### Upload using a Wildcard Pattern:
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
path: path/**/[abc]rtifac?/*
|
path: path/**/[abc]rtifac?/*
|
||||||
|
@ -64,7 +64,7 @@ The [@actions/artifact](https://github.com/actions/toolkit/tree/master/packages/
|
||||||
To upload artifacts only when the previous step of a job failed, use [`if: failure()`](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-status-check-functions):
|
To upload artifacts only when the previous step of a job failed, use [`if: failure()`](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-status-check-functions):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
|
@ -75,7 +75,7 @@ To upload artifacts only when the previous step of a job failed, use [`if: failu
|
||||||
|
|
||||||
You can upload an artifact without specifying a name
|
You can upload an artifact without specifying a name
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: path/to/artifact/world.txt
|
path: path/to/artifact/world.txt
|
||||||
```
|
```
|
||||||
|
@ -88,17 +88,17 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- run: echo hi > world.txt
|
- run: echo hi > world.txt
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: world.txt
|
path: world.txt
|
||||||
|
|
||||||
- run: echo howdy > extra-file.txt
|
- run: echo howdy > extra-file.txt
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: extra-file.txt
|
path: extra-file.txt
|
||||||
|
|
||||||
- run: echo hello > world.txt
|
- run: echo hello > world.txt
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: world.txt
|
path: world.txt
|
||||||
```
|
```
|
||||||
|
@ -112,7 +112,7 @@ You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expan
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/new/artifact
|
mkdir -p ~/new/artifact
|
||||||
echo hello > ~/new/artifact/world.txt
|
echo hello > ~/new/artifact/world.txt
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: 'Artifacts-V2'
|
name: 'Artifacts-V2'
|
||||||
path: '~/new/**/*'
|
path: '~/new/**/*'
|
||||||
|
@ -127,7 +127,7 @@ Environment variables along with context expressions can also be used for input.
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ${{ github.workspace }}/artifact
|
mkdir -p ${{ github.workspace }}/artifact
|
||||||
echo hello > ${{ github.workspace }}/artifact/world.txt
|
echo hello > ${{ github.workspace }}/artifact/world.txt
|
||||||
- uses: actions/upload-artifact@v2-preview
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ env.name }}-name
|
name: ${{ env.name }}-name
|
||||||
path: ${{ github.workspace }}/artifact/**/*
|
path: ${{ github.workspace }}/artifact/**/*
|
||||||
|
|
Loading…
Reference in a new issue