1
0
mirror of synced 2025-12-21 19:06:49 -05:00

bump version for upload-artifact and download-artifact code snippets (#25782)

This commit is contained in:
Jonathan Tamsut
2022-03-03 16:17:09 -08:00
committed by GitHub
parent 3c36b78864
commit d04e4046ae
19 changed files with 35 additions and 35 deletions

View File

@@ -513,7 +513,7 @@ const article: PlaygroundArticleT = {
- name: Test with pytest - name: Test with pytest
run: pytest tests.py --doctest-modules --junitxml=junit/test-results-\${{ matrix.python-version }}.xml run: pytest tests.py --doctest-modules --junitxml=junit/test-results-\${{ matrix.python-version }}.xml
- name: Upload pytest test results - name: Upload pytest test results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: pytest-results-\${{ matrix.python-version }} name: pytest-results-\${{ matrix.python-version }}
path: junit/test-results-\${{ matrix.python-version }}.xml path: junit/test-results-\${{ matrix.python-version }}.xml

View File

@@ -119,7 +119,7 @@ steps:
distribution: 'adopt' distribution: 'adopt'
- run: ant -noinput -buildfile build.xml - run: ant -noinput -buildfile build.xml
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: Package name: Package
path: build/jar path: build/jar

View File

@@ -138,7 +138,7 @@ steps:
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with: with:
arguments: build arguments: build
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: Package name: Package
path: build/libs path: build/libs

View File

@@ -140,7 +140,7 @@ steps:
distribution: 'adopt' distribution: 'adopt'
- run: mvn --batch-mode --update-snapshots verify - run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging - run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: Package name: Package
path: staging path: staging

View File

@@ -218,7 +218,7 @@ jobs:
- name: Test with dotnet - name: Test with dotnet
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
- name: Upload dotnet test results - name: Upload dotnet test results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: dotnet-results-${{ matrix.dotnet-version }} name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }} path: TestResults-${{ matrix.dotnet-version }}

View File

@@ -213,7 +213,7 @@ jobs:
shell: pwsh shell: pwsh
run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml
- name: Upload test results - name: Upload test results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: ubuntu-Unit-Tests name: ubuntu-Unit-Tests
path: Unit.Tests.xml path: Unit.Tests.xml

View File

@@ -380,7 +380,7 @@ jobs:
- name: Test with pytest - name: Test with pytest
run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results - name: Upload pytest test results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: pytest-results-${{ matrix.python-version }} name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml path: junit/test-results-${{ matrix.python-version }}.xml

View File

@@ -95,7 +95,7 @@ jobs:
run: mvn clean install run: mvn clean install
- name: Upload artifact for deployment job - name: Upload artifact for deployment job
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: java-app name: java-app
path: '{% raw %}${{ github.workspace }}{% endraw %}/target/*.jar' path: '{% raw %}${{ github.workspace }}{% endraw %}/target/*.jar'
@@ -109,7 +109,7 @@ jobs:
steps: steps:
- name: Download artifact from build job - name: Download artifact from build job
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: java-app name: java-app

View File

@@ -105,7 +105,7 @@ jobs:
run: dotnet publish -c Release -o {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp run: dotnet publish -c Release -o {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp
- name: Upload artifact for deployment job - name: Upload artifact for deployment job
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: .net-app name: .net-app
path: {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp path: {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp
@@ -119,7 +119,7 @@ jobs:
steps: steps:
- name: Download artifact from build job - name: Download artifact from build job
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: .net-app name: .net-app

View File

@@ -100,7 +100,7 @@ jobs:
npm run build --if-present npm run build --if-present
npm run test --if-present npm run test --if-present
- name: Upload artifact for deployment job - name: Upload artifact for deployment job
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: node-app name: node-app
path: . path: .
@@ -114,7 +114,7 @@ jobs:
steps: steps:
- name: Download artifact from build job - name: Download artifact from build job
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: node-app name: node-app

View File

@@ -116,7 +116,7 @@ jobs:
run: composer validate --no-check-publish && composer install --prefer-dist --no-progress run: composer validate --no-check-publish && composer install --prefer-dist --no-progress
- name: Upload artifact for deployment job - name: Upload artifact for deployment job
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: php-app name: php-app
path: . path: .
@@ -130,7 +130,7 @@ jobs:
steps: steps:
- name: Download artifact from build job - name: Download artifact from build job
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: php-app name: php-app

View File

@@ -111,7 +111,7 @@ jobs:
# Optional: Add a step to run tests here (PyTest, Django test suites, etc.) # Optional: Add a step to run tests here (PyTest, Django test suites, etc.)
- name: Upload artifact for deployment jobs - name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: python-app name: python-app
path: | path: |
@@ -126,7 +126,7 @@ jobs:
steps: steps:
- name: Download artifact from build job - name: Download artifact from build job
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: python-app name: python-app
path: . path: .

View File

@@ -516,7 +516,7 @@ jobs:
./build.sh --log-path ${{ runner.temp }}/build_logs ./build.sh --log-path ${{ runner.temp }}/build_logs
- name: Upload logs on fail - name: Upload logs on fail
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: Build failure logs name: Build failure logs
path: ${{ runner.temp }}/build_logs path: ${{ runner.temp }}/build_logs
@@ -598,7 +598,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: npm test > test-job-${{ strategy.job-index }}.txt - run: npm test > test-job-${{ strategy.job-index }}.txt
- name: Upload logs - name: Upload logs
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: Build log for job ${{ strategy.job-index }} name: Build log for job ${{ strategy.job-index }}
path: test-job-${{ strategy.job-index }}.txt path: test-job-${{ strategy.job-index }}.txt

View File

@@ -75,7 +75,7 @@ jobs:
run: | run: |
expr 1 + 1 > output.log expr 1 + 1 > output.log
- name: Upload output file - name: Upload output file
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: output-log-file name: output-log-file
path: output.log path: output.log
@@ -88,7 +88,7 @@ jobs:
example-job: example-job:
steps: steps:
- name: Download a single artifact - name: Download a single artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: output-log-file name: output-log-file
``` ```

View File

@@ -157,7 +157,7 @@ GitHub Actions
{% raw %} {% raw %}
```yaml ```yaml
- name: Upload math result for job 1 - name: Upload math result for job 1
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: homework name: homework
path: math-homework.txt path: math-homework.txt
@@ -165,7 +165,7 @@ GitHub Actions
... ...
- name: Download math result for job 1 - name: Download math result for job 1
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: homework name: homework
``` ```

View File

@@ -391,7 +391,7 @@ artifacts:
{% raw %} {% raw %}
```yaml ```yaml
- name: Upload math result for job 1 - name: Upload math result for job 1
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: homework name: homework
path: math-homework.txt path: math-homework.txt

View File

@@ -1429,7 +1429,7 @@ jobs:
run: | run: |
mkdir -p ./pr mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number echo $PR_NUMBER > ./pr/pr_number
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: pr_number name: pr_number
path: pr/ path: pr/

View File

@@ -101,14 +101,14 @@ jobs:
npm run build --if-present npm run build --if-present
npm test npm test
- name: Archive production artifacts - name: Archive production artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: dist-without-markdown name: dist-without-markdown
path: | path: |
dist dist
!dist/**/*.md !dist/**/*.md
- name: Archive code coverage results - name: Archive code coverage results
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: code-coverage-report name: code-coverage-report
path: output/test/code-coverage.html 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} ```yaml{:copy}
- name: 'Upload Artifact' - name: 'Upload Artifact'
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: my-artifact name: my-artifact
path: my_file.txt path: my_file.txt
@@ -149,7 +149,7 @@ Specify an artifact's name to download an individual artifact. If you uploaded a
```yaml ```yaml
- name: Download a single artifact - name: Download a single artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: my-artifact name: my-artifact
``` ```
@@ -158,7 +158,7 @@ You can also download all artifacts in a workflow run by not specifying a name.
```yaml ```yaml
- name: Download all workflow run artifacts - 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. If you download all workflow run's artifacts, a directory for each artifact is created using its name.
@@ -200,7 +200,7 @@ jobs:
run: | run: |
expr 3 + 7 > math-homework.txt expr 3 + 7 > math-homework.txt
- name: Upload math result for job 1 - name: Upload math result for job 1
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: homework name: homework
path: math-homework.txt path: math-homework.txt
@@ -211,7 +211,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Download math result for job 1 - name: Download math result for job 1
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: homework name: homework
- shell: bash - shell: bash
@@ -219,7 +219,7 @@ jobs:
value=`cat math-homework.txt` value=`cat math-homework.txt`
expr $value \* 9 > math-homework.txt expr $value \* 9 > math-homework.txt
- name: Upload math result for job 2 - name: Upload math result for job 2
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: homework name: homework
path: math-homework.txt path: math-homework.txt
@@ -230,7 +230,7 @@ jobs:
runs-on: macOS-latest runs-on: macOS-latest
steps: steps:
- name: Download math result for job 2 - name: Download math result for job 2
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: homework name: homework
- name: Print the final result - name: Print the final result

View File

@@ -72,7 +72,7 @@ You can populate the runner tool cache by running a {% data variables.product.pr
cd "${{ runner.tool_cache }}" cd "${{ runner.tool_cache }}"
tar -czf tool_cache.tar.gz * tar -czf tool_cache.tar.gz *
- name: Upload tool cache artifact - name: Upload tool cache artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
path: ${{runner.tool_cache}}/tool_cache.tar.gz path: ${{runner.tool_cache}}/tool_cache.tar.gz
``` ```