mirror of
https://gitea.com/actions/upload-artifact.git
synced 2025-04-22 00:35:32 +08:00
De-quote some YAML blocks/examples in README.md
This commit is contained in:
parent
7aeb0033e0
commit
e14a1b3d0a
16
README.md
16
README.md
@ -158,10 +158,10 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
|
|||||||
matrix:
|
matrix:
|
||||||
node-version: [8.x, 10.x, 12.x, 13.x]
|
node-version: [8.x, 10.x, 12.x, 13.x]
|
||||||
steps:
|
steps:
|
||||||
- name: 'Create a file'
|
- name: Create a file
|
||||||
run: echo ${{ matrix.node-version }} > my_file.txt
|
run: echo ${{ matrix.node-version }} > my_file.txt
|
||||||
- name: 'Accidently upload to the same artifact via multiple jobs'
|
- name: Accidently upload to the same artifact via multiple jobs
|
||||||
uses: 'actions/upload-artifact@v2'
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
@ -170,7 +170,7 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
|
|||||||
In the above example, four jobs will upload four different files to the same artifact but there will only be one file available when `my-artifact` is downloaded. Each job overwrites what was previously uploaded. To ensure that jobs don't overwrite existing artifacts, use a different name per job:
|
In the above example, four jobs will upload four different files to the same artifact but there will only be one file available when `my-artifact` is downloaded. Each job overwrites what was previously uploaded. To ensure that jobs don't overwrite existing artifacts, use a different name per job:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: 'actions/upload-artifact@v2'
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact ${{ matrix.node-version }}
|
name: my-artifact ${{ matrix.node-version }}
|
||||||
path: ${{ github.workspace }}
|
path: ${{ github.workspace }}
|
||||||
@ -186,8 +186,8 @@ You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expan
|
|||||||
echo hello > ~/new/artifact/world.txt
|
echo hello > ~/new/artifact/world.txt
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: 'Artifacts-V2'
|
name: Artifacts-V2
|
||||||
path: '~/new/**/*'
|
path: ~/new/**/*
|
||||||
```
|
```
|
||||||
|
|
||||||
Environment variables along with context expressions can also be used for input. For documentation see [context and expression syntax](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions):
|
Environment variables along with context expressions can also be used for input. For documentation see [context and expression syntax](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions):
|
||||||
@ -210,10 +210,10 @@ Environment variables along with context expressions can also be used for input.
|
|||||||
Artifacts are retained for 90 days by default. You can specify a shorter retention period using the `retention-days` input:
|
Artifacts are retained for 90 days by default. You can specify a shorter retention period using the `retention-days` input:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: 'Create a file'
|
- name: Create a file
|
||||||
run: echo "I won't live long" > my_file.txt
|
run: echo "I won't live long" > my_file.txt
|
||||||
|
|
||||||
- name: 'Upload Artifact'
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
|
Loading…
x
Reference in New Issue
Block a user