File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,20 @@ Environment variables along with context expressions can also be used for input.
205
205
path: ${{ github.workspace }}/artifact/**/*
206
206
` ` `
207
207
208
+ For environment variables created in other steps, make sure to use the `env` expression syntax
209
+
210
+ ```
211
+ steps:
212
+ - run: |
213
+ mkdir testing
214
+ echo "This is a file to upload" > testing/file.txt
215
+ echo "artifactPath=testing/file.txt" >> $GITHUB_ENV
216
+ - uses: actions/upload-artifact@v2
217
+ with:
218
+ name: artifact
219
+ path: ${{ env.artifactPath }} # this will resolve to testing/file.txt at runtime
220
+ ```
221
+
208
222
### Retention Period
209
223
210
224
Artifacts are retained for 90 days by default. You can specify a shorter retention period using the `retention-days` input:
You can’t perform that action at this time.
0 commit comments