.github: Move upload-artifact-s3 to common var (#64435)
authorEli Uriegas <eliuriegas@fb.com>
Thu, 2 Sep 2021 18:23:38 +0000 (11:23 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 2 Sep 2021 18:31:52 +0000 (11:31 -0700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64435

Move upload-artifact-s3 to a common variable to be used amongst our
jinja templates, this should make it easier in the future to update
these images

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
cc ezyang seemethere malfet lg20987 pytorch/pytorch-dev-infra

Test Plan: Imported from OSS

Reviewed By: malfet

Differential Revision: D30732777

Pulled By: seemethere

fbshipit-source-id: 51cd485f5abae134c3c49dfa878e6303ba8e5f25

13 files changed:
.github/templates/common.yml.j2
.github/templates/linux_ci_workflow.yml.j2
.github/templates/windows_ci_workflow.yml.j2
.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml
.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml
.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml
.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml
.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml
.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml
.github/workflows/generated-periodic-win-vs2019-cuda11.1-py3.yml
.github/workflows/generated-win-vs2019-cpu-py3.yml
.github/workflows/generated-win-vs2019-cuda10.1-py3.yml
.github/workflows/generated-win-vs2019-cuda11.3-py3.yml

index f9296e0..6757785 100644 (file)
@@ -1,3 +1,5 @@
+{%- set upload_artifact_s3_action = "seemethere/upload-artifact-s3@v3" -%}
+
 {%- macro display_ec2_information() -%}
       - name: Display EC2 information
         shell: bash
index 01ea7af..209e9c3 100644 (file)
@@ -180,7 +180,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: !{{ common.upload_artifact_s3_action }}
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -356,7 +356,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: !{{ common.upload_artifact_s3_action }}
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
@@ -423,7 +423,7 @@ jobs:
         run: |
           # Ensure the working directory gets chowned back to the current user
           docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
-      - uses: seemethere/upload-artifact-s3@v3
+      - uses: !{{ common.upload_artifact_s3_action }}
         name: Upload Python Docs Preview
         if: ${{ github.event_name == 'pull_request' && matrix.docs_type == 'python' }}
         with:
@@ -431,7 +431,7 @@ jobs:
           if-no-files-found: error
           path: pytorch.github.io/docs/merge/
           s3-prefix: ${{ github.repository }}/pr-previews/pr/${{ github.event.pull_request.number }}
-      - uses: seemethere/upload-artifact-s3@v3
+      - uses: !{{ common.upload_artifact_s3_action }}
         name: Upload C++ Docs Preview
         if: ${{ github.event_name == 'pull_request' && matrix.docs_type == 'cppdocs' }}
         with:
index b927281..1268f27 100644 (file)
@@ -136,7 +136,7 @@ jobs:
           path: C:\${{ github.run_id }}\build-results
       - name: Upload artifacts to s3
         if: always()
-        uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+        uses: !{{ common.upload_artifact_s3_action }}
         with:
           retention-days: 14
           if-no-files-found: error
index f1c0ea4..5dc8d9f 100644 (file)
@@ -233,7 +233,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -454,7 +454,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
index e13c619..c060b15 100644 (file)
@@ -233,7 +233,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -458,7 +458,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
index e44dfbe..dfbf9bf 100644 (file)
@@ -233,7 +233,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -454,7 +454,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
index 618b131..53b09cd 100644 (file)
@@ -233,7 +233,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -454,7 +454,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
index 6ceabb0..eb77554 100644 (file)
@@ -233,7 +233,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -454,7 +454,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
index 5b60a1b..694a79a 100644 (file)
@@ -231,7 +231,7 @@ jobs:
       - name: Archive artifacts into zip
         run: |
           zip -1 -r artifacts.zip dist/ build/custom_test_artifacts build/lib build/bin .pytorch-test-times.json
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Build Artifacts on S3
         with:
           name: ${{ env.BUILD_ENVIRONMENT }}
@@ -452,7 +452,7 @@ jobs:
           if-no-files-found: error
           path:
             test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+      - uses: seemethere/upload-artifact-s3@v3
         name: Store PyTorch Test Reports on S3
         if: always()
         with:
index de74cdc..78e4c7c 100644 (file)
@@ -107,7 +107,7 @@ jobs:
           path: C:\${{ github.run_id }}\build-results
       - name: Upload artifacts to s3
         if: always()
-        uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+        uses: seemethere/upload-artifact-s3@v3
         with:
           retention-days: 14
           if-no-files-found: error
index 4f43d27..bed6da4 100644 (file)
@@ -99,7 +99,7 @@ jobs:
           path: C:\${{ github.run_id }}\build-results
       - name: Upload artifacts to s3
         if: always()
-        uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+        uses: seemethere/upload-artifact-s3@v3
         with:
           retention-days: 14
           if-no-files-found: error
index ad4cf37..f5b2e6a 100644 (file)
@@ -109,7 +109,7 @@ jobs:
           path: C:\${{ github.run_id }}\build-results
       - name: Upload artifacts to s3
         if: always()
-        uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+        uses: seemethere/upload-artifact-s3@v3
         with:
           retention-days: 14
           if-no-files-found: error
index 299b48d..bf1cbe4 100644 (file)
@@ -109,7 +109,7 @@ jobs:
           path: C:\${{ github.run_id }}\build-results
       - name: Upload artifacts to s3
         if: always()
-        uses: seemethere/upload-artifact-s3@9d7ceb0ab39c2c88d93ef7792b27425b27d59162
+        uses: seemethere/upload-artifact-s3@v3
         with:
           retention-days: 14
           if-no-files-found: error