mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-01 17:26:34 +00:00
De-quote some YAML blocks/examples in README.md
This commit is contained in:
parent
7aeb0033e0
commit
e14a1b3d0a
1 changed files with 8 additions and 8 deletions
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:
|
||||
node-version: [8.x, 10.x, 12.x, 13.x]
|
||||
steps:
|
||||
- name: 'Create a file'
|
||||
- name: Create a file
|
||||
run: echo ${{ matrix.node-version }} > my_file.txt
|
||||
- name: 'Accidently upload to the same artifact via multiple jobs'
|
||||
uses: 'actions/upload-artifact@v2'
|
||||
- name: Accidently upload to the same artifact via multiple jobs
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: my-artifact
|
||||
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:
|
||||
|
||||
```yaml
|
||||
uses: 'actions/upload-artifact@v2'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: my-artifact ${{ matrix.node-version }}
|
||||
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
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: 'Artifacts-V2'
|
||||
path: '~/new/**/*'
|
||||
name: Artifacts-V2
|
||||
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):
|
||||
|
@ -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:
|
||||
|
||||
```yaml
|
||||
- name: 'Create a file'
|
||||
- name: Create a file
|
||||
run: echo "I won't live long" > my_file.txt
|
||||
|
||||
- name: 'Upload Artifact'
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: my-artifact
|
||||
|
|
Loading…
Add table
Reference in a new issue