bump version for upload-artifact and download-artifact code snippets (#25782)
This commit is contained in:
@@ -513,7 +513,7 @@ const article: PlaygroundArticleT = {
|
||||
- name: Test with pytest
|
||||
run: pytest tests.py --doctest-modules --junitxml=junit/test-results-\${{ matrix.python-version }}.xml
|
||||
- name: Upload pytest test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pytest-results-\${{ matrix.python-version }}
|
||||
path: junit/test-results-\${{ matrix.python-version }}.xml
|
||||
|
||||
@@ -119,7 +119,7 @@ steps:
|
||||
distribution: 'adopt'
|
||||
|
||||
- run: ant -noinput -buildfile build.xml
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package
|
||||
path: build/jar
|
||||
|
||||
@@ -138,7 +138,7 @@ steps:
|
||||
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
|
||||
with:
|
||||
arguments: build
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package
|
||||
path: build/libs
|
||||
|
||||
@@ -140,7 +140,7 @@ steps:
|
||||
distribution: 'adopt'
|
||||
- run: mvn --batch-mode --update-snapshots verify
|
||||
- run: mkdir staging && cp target/*.jar staging
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Package
|
||||
path: staging
|
||||
|
||||
@@ -218,7 +218,7 @@ jobs:
|
||||
- name: Test with dotnet
|
||||
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
|
||||
- name: Upload dotnet test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dotnet-results-${{ matrix.dotnet-version }}
|
||||
path: TestResults-${{ matrix.dotnet-version }}
|
||||
|
||||
@@ -213,7 +213,7 @@ jobs:
|
||||
shell: pwsh
|
||||
run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ubuntu-Unit-Tests
|
||||
path: Unit.Tests.xml
|
||||
|
||||
@@ -380,7 +380,7 @@ jobs:
|
||||
- name: Test with pytest
|
||||
run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
|
||||
- name: Upload pytest test results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pytest-results-${{ matrix.python-version }}
|
||||
path: junit/test-results-${{ matrix.python-version }}.xml
|
||||
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
run: mvn clean install
|
||||
|
||||
- name: Upload artifact for deployment job
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: java-app
|
||||
path: '{% raw %}${{ github.workspace }}{% endraw %}/target/*.jar'
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifact from build job
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: java-app
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
run: dotnet publish -c Release -o {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp
|
||||
|
||||
- name: Upload artifact for deployment job
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: .net-app
|
||||
path: {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifact from build job
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: .net-app
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
npm run build --if-present
|
||||
npm run test --if-present
|
||||
- name: Upload artifact for deployment job
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: node-app
|
||||
path: .
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifact from build job
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: node-app
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
run: composer validate --no-check-publish && composer install --prefer-dist --no-progress
|
||||
|
||||
- name: Upload artifact for deployment job
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: php-app
|
||||
path: .
|
||||
@@ -130,7 +130,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifact from build job
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: php-app
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
# Optional: Add a step to run tests here (PyTest, Django test suites, etc.)
|
||||
|
||||
- name: Upload artifact for deployment jobs
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: python-app
|
||||
path: |
|
||||
@@ -126,7 +126,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifact from build job
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: python-app
|
||||
path: .
|
||||
|
||||
@@ -516,7 +516,7 @@ jobs:
|
||||
./build.sh --log-path ${{ runner.temp }}/build_logs
|
||||
- name: Upload logs on fail
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Build failure logs
|
||||
path: ${{ runner.temp }}/build_logs
|
||||
@@ -598,7 +598,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm test > test-job-${{ strategy.job-index }}.txt
|
||||
- name: Upload logs
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Build log for job ${{ strategy.job-index }}
|
||||
path: test-job-${{ strategy.job-index }}.txt
|
||||
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
run: |
|
||||
expr 1 + 1 > output.log
|
||||
- name: Upload output file
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: output-log-file
|
||||
path: output.log
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
example-job:
|
||||
steps:
|
||||
- name: Download a single artifact
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: output-log-file
|
||||
```
|
||||
|
||||
@@ -157,7 +157,7 @@ GitHub Actions
|
||||
{% raw %}
|
||||
```yaml
|
||||
- name: Upload math result for job 1
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
path: math-homework.txt
|
||||
@@ -165,7 +165,7 @@ GitHub Actions
|
||||
...
|
||||
|
||||
- name: Download math result for job 1
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
```
|
||||
|
||||
@@ -391,7 +391,7 @@ artifacts:
|
||||
{% raw %}
|
||||
```yaml
|
||||
- name: Upload math result for job 1
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
path: math-homework.txt
|
||||
|
||||
@@ -1429,7 +1429,7 @@ jobs:
|
||||
run: |
|
||||
mkdir -p ./pr
|
||||
echo $PR_NUMBER > ./pr/pr_number
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pr_number
|
||||
path: pr/
|
||||
|
||||
@@ -101,14 +101,14 @@ jobs:
|
||||
npm run build --if-present
|
||||
npm test
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dist-without-markdown
|
||||
path: |
|
||||
dist
|
||||
!dist/**/*.md
|
||||
- name: Archive code coverage results
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: code-coverage-report
|
||||
path: output/test/code-coverage.html
|
||||
@@ -120,7 +120,7 @@ You can define a custom retention period for individual artifacts created by a w
|
||||
|
||||
```yaml{:copy}
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: my-artifact
|
||||
path: my_file.txt
|
||||
@@ -149,7 +149,7 @@ Specify an artifact's name to download an individual artifact. If you uploaded a
|
||||
|
||||
```yaml
|
||||
- name: Download a single artifact
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: my-artifact
|
||||
```
|
||||
@@ -158,7 +158,7 @@ You can also download all artifacts in a workflow run by not specifying a name.
|
||||
|
||||
```yaml
|
||||
- name: Download all workflow run artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
```
|
||||
|
||||
If you download all workflow run's artifacts, a directory for each artifact is created using its name.
|
||||
@@ -200,7 +200,7 @@ jobs:
|
||||
run: |
|
||||
expr 3 + 7 > math-homework.txt
|
||||
- name: Upload math result for job 1
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
path: math-homework.txt
|
||||
@@ -211,7 +211,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Download math result for job 1
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
- shell: bash
|
||||
@@ -219,7 +219,7 @@ jobs:
|
||||
value=`cat math-homework.txt`
|
||||
expr $value \* 9 > math-homework.txt
|
||||
- name: Upload math result for job 2
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
path: math-homework.txt
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- name: Download math result for job 2
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: homework
|
||||
- name: Print the final result
|
||||
|
||||
@@ -72,7 +72,7 @@ You can populate the runner tool cache by running a {% data variables.product.pr
|
||||
cd "${{ runner.tool_cache }}"
|
||||
tar -czf tool_cache.tar.gz *
|
||||
- name: Upload tool cache artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: ${{runner.tool_cache}}/tool_cache.tar.gz
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user