From 9dbe5bcc6f8e349d913e88a6e35209549ba90753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20R=C3=A4thlein?= Date: Tue, 4 Jun 2024 12:02:17 +0200 Subject: [PATCH] Update GitHub actions versions (#8689) ## Describe your changes Update our GitHub actions versions to fix the deprecation warning. With `actions/upload-artifact@v4`, multiple jobs cannot upload to the same folder anymore. Hence, I have updated the flows according to [this migration guide](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact). See also this discussion: https://github.com/actions/upload-artifact/issues/478 The workflows for cypress are kept on `v3` according to [this comment](https://github.com/streamlit/streamlit/pull/8689#pullrequestreview-2082521366) to keep the usage of it simple until we retire it soonish. ## GitHub Issue Link (if applicable) ## Testing Plan - if the CI workflows run through, we should be all good --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license. --- .github/actions/make_init/action.yml | 6 +++--- .github/workflows/nightly.yml | 2 +- .github/workflows/pr-preview.yml | 2 +- .github/workflows/python-versions.yml | 9 +++++---- .github/workflows/release.yml | 7 ++++--- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/actions/make_init/action.yml b/.github/actions/make_init/action.yml index a703380d33f6..e3ded5ce872f 100644 --- a/.github/actions/make_init/action.yml +++ b/.github/actions/make_init/action.yml @@ -13,7 +13,7 @@ runs: steps: - name: Restore pre-commit cache id: cache-pre-commit - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: v1-pre-commit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }} @@ -23,7 +23,7 @@ runs: pre-commit install-hooks shell: bash --login -eo pipefail {0} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" cache: "yarn" @@ -75,7 +75,7 @@ runs: - if: inputs.use_cached_venv == 'true' name: Restore virtualenv from cache id: cache-virtualenv - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: venv key: v1-python-venv-${{ hashFiles('**/python_cache_key.md5') }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 16a123b0f701..f318e4e0a2ee 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -191,7 +191,7 @@ jobs: sudo apt install rsync make package - name: Store Whl File - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: whl_file path: lib/dist/*.whl diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 8d4cfb66ac2c..971a6069cb09 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -50,7 +50,7 @@ jobs: sudo apt install rsync BUILD_AS_FAST_AS_POSSIBLE=1 make package - name: Store Whl File - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: whl_file path: lib/dist/*.whl diff --git a/.github/workflows/python-versions.yml b/.github/workflows/python-versions.yml index c3f57f3f6dd0..86df0e370957 100644 --- a/.github/workflows/python-versions.yml +++ b/.github/workflows/python-versions.yml @@ -130,9 +130,9 @@ jobs: CONSTRAINT_URL="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${CONSTRAINTS_BRANCH}/constraints-${PYTHON_VERSION}.txt" diff -y <(echo "Old"; curl -s "${CONSTRAINT_URL}") <(echo "New"; cat "${CONSTRAINTS_FILE}") || true - name: Upload constraints file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: constraints + name: constraints-${{ matrix.python_version }} path: ${{ env.CONSTRAINTS_FILE }} if-no-files-found: error @@ -164,10 +164,11 @@ jobs: # later git commands can work. persist-credentials: true - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: constraints path: . + pattern: constraints-* + merge-multiple: true - name: Commit and push constraint files run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d151c2e0c68..4d020a8e486d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: sudo apt install rsync make package - name: Store Package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Release path: lib/dist @@ -138,10 +138,11 @@ jobs: # later git commands can work. persist-credentials: true path: constraints - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: constraints path: constraints + pattern: constraints-* + merge-multiple: true - name: Commit and push constraint files as tag run: | cd constraints;