From 0b7d0c15a38b0daf9e35d4979cefb53505c36f6b Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Tue, 7 May 2024 14:40:56 +0200 Subject: [PATCH] Update actions with deprecated versions [noissue] --- .github/workflows/build.yml | 4 ++-- .github/workflows/ci.yml | 7 ++++--- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 16 +++++++-------- .../github/.github/workflows/build.yml.j2 | 2 +- templates/github/.github/workflows/ci.yml.j2 | 5 +++-- .../github/.github/workflows/nightly.yml.j2 | 8 ++++---- .../github/.github/workflows/publish.yml.j2 | 20 +++++++++---------- .../github/.github/workflows/test.yml.j2 | 14 ++++++------- templates/macros.j2 | 2 +- 10 files changed, 41 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f304c8a..ff2255dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: path: "plugin_template" # We need the full history for bootstrapping fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" - name: "Bootstrap catdog plugin" @@ -44,7 +44,7 @@ jobs: python3 setup.py sdist bdist_wheel --python-tag py3 twine check dist/* - name: "Upload Package whl" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "plugin_package" path: "pulp_catdog/dist/" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cbf41af..bd65760d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: with: path: "plugin_template" fetch-depth: 0 - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: "3.11" - name: "Bootstrap catdog plugin" @@ -70,10 +70,11 @@ jobs: mkdir -p "pulp_catdog" working-directory: "." - name: "Download Deprecations" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: "deprecations" + pattern: "deprecations-*" path: "pulp_catdog" + merge-multiple: true - name: "Print deprecations" run: | cat deprecations-*.txt | sort -u diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 86aeade8..f0c5bb5e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,7 +24,7 @@ jobs: path: "plugin_template" # We need the full history for bootstrapping fetch-depth: 0 - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: "3.11" - name: "Lint plugin_template" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e901736..faf6c4b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: # We need the full history for bootstrapping fetch-depth: 0 - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: "3.11" @@ -52,7 +52,7 @@ jobs: repository: "pulp/pulp-openapi-generator" path: "pulp-openapi-generator" - - uses: "actions/download-artifact@v3" + - uses: "actions/download-artifact@v4" with: name: "plugin_package" path: "pulp_catdog/dist/" @@ -128,15 +128,15 @@ jobs: docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-${{ matrix.env.TEST }}.txt - name: "Upload Deprecations" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: "deprecations" + name: "deprecations-${{ matrix.env.TEST }}" path: "pulp_catdog/deprecations-${{ matrix.env.TEST }}.txt" if-no-files-found: "error" retention-days: 5 - name: Upload python client packages if: ${{ env.TEST == 'pulp' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "python-client.tar" path: "pulp_catdog/catdog-python-client.tar" @@ -145,7 +145,7 @@ jobs: - name: Upload python client docs if: ${{ env.TEST == 'pulp' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "python-client-docs.tar" path: "pulp_catdog/catdog-python-client-docs.tar" @@ -153,7 +153,7 @@ jobs: retention-days: 5 - name: Upload Ruby client if: ${{ env.TEST == 'pulp' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "ruby-client.tar" path: "pulp_catdog/catdog-ruby-client.tar" @@ -161,7 +161,7 @@ jobs: retention-days: 5 - name: Upload built docs if: ${{ env.TEST == 'docs' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "docs.tar" path: "pulp_catdog/docs/docs.tar" diff --git a/templates/github/.github/workflows/build.yml.j2 b/templates/github/.github/workflows/build.yml.j2 index ee14abed..041b828e 100644 --- a/templates/github/.github/workflows/build.yml.j2 +++ b/templates/github/.github/workflows/build.yml.j2 @@ -26,7 +26,7 @@ jobs: python3 setup.py sdist bdist_wheel --python-tag py3 twine check dist/* - name: "Upload Package whl" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "plugin_package" path: "{{ plugin_name }}/dist/" diff --git a/templates/github/.github/workflows/ci.yml.j2 b/templates/github/.github/workflows/ci.yml.j2 index 79c2006f..72f1d63e 100644 --- a/templates/github/.github/workflows/ci.yml.j2 +++ b/templates/github/.github/workflows/ci.yml.j2 @@ -68,10 +68,11 @@ jobs: mkdir -p "{{ plugin_name }}" working-directory: "." - name: "Download Deprecations" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: "deprecations" + pattern: "deprecations-*" path: "{{ plugin_name }}" + merge-multiple: true - name: "Print deprecations" run: | cat deprecations-*.txt | sort -u diff --git a/templates/github/.github/workflows/nightly.yml.j2 b/templates/github/.github/workflows/nightly.yml.j2 index 8a268f79..0ceb9970 100644 --- a/templates/github/.github/workflows/nightly.yml.j2 +++ b/templates/github/.github/workflows/nightly.yml.j2 @@ -66,7 +66,7 @@ jobs: steps: {{ checkout(path=plugin_name) | indent(6) }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: "plugin_package" path: "{{ plugin_name }}/dist/" @@ -79,13 +79,13 @@ jobs: {%- if publish_docs_to_pulpprojectdotorg and docs_test %} - name: Download built docs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: "docs.tar" path: "{{ plugin_name }}" - name: Download Python client docs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: "python-client-docs.tar" path: "{{ plugin_name }}" @@ -121,7 +121,7 @@ jobs: {{ checkout(repository="pulp/pulp-openapi-generator", path="pulp-openapi-generator") | indent(6) }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: "plugin_package" path: "{{ plugin_name }}/dist/" diff --git a/templates/github/.github/workflows/publish.yml.j2 b/templates/github/.github/workflows/publish.yml.j2 index af9253be..4e766a84 100644 --- a/templates/github/.github/workflows/publish.yml.j2 +++ b/templates/github/.github/workflows/publish.yml.j2 @@ -39,7 +39,7 @@ jobs: {{ setup_python() | indent(6) }} - - uses: "actions/download-artifact@v3" + - uses: "actions/download-artifact@v4" with: name: "plugin_package" path: "{{ plugin_name }}/dist/" @@ -64,14 +64,14 @@ jobs: {%- for plugin in plugins %} - name: "Upload python client packages" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "python-client.tar" path: "{{ plugin_name }}/{{ plugin.app_label }}-python-client.tar" if-no-files-found: "error" - name: "Upload python client docs" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "python-client-docs.tar" path: "{{ plugin_name }}/{{ plugin.app_label }}-python-client-docs.tar" @@ -79,7 +79,7 @@ jobs: {%- if deploy_client_to_rubygems %} - name: "Upload ruby client packages" - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "ruby-client.tar" path: "{{ plugin_name }}/{{ plugin.app_label }}-ruby-client.tar" @@ -96,7 +96,7 @@ jobs: tar -cvf docs/docs.tar docs/_build - name: "Upload built docs" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "docs.tar" path: "{{ plugin_name }}/docs/docs.tar" @@ -116,7 +116,7 @@ jobs: steps: {{ checkout(depth=1, path=plugin_name) | indent(6) }} - - uses: "actions/download-artifact@v3" + - uses: "actions/download-artifact@v4" with: name: "plugin_package" path: "{{ plugin_name }}/dist/" @@ -145,7 +145,7 @@ jobs: {{ checkout(depth=1, path=plugin_name) | indent(6) }} - name: "Download Python client" - uses: "actions/download-artifact@v3" + uses: "actions/download-artifact@v4" with: name: "python-client.tar" path: "{{ plugin_name }}/" @@ -180,7 +180,7 @@ jobs: {{ checkout(depth=1, path=plugin_name) | indent(6) }} - name: "Download Ruby client" - uses: "actions/download-artifact@v3" + uses: "actions/download-artifact@v4" with: name: "ruby-client.tar" path: "{{ plugin_name }}/" @@ -219,13 +219,13 @@ jobs: {{ set_secrets() | indent(6) }} - name: "Download built docs" - uses: "actions/download-artifact@v3" + uses: "actions/download-artifact@v4" with: name: "docs.tar" path: "{{ plugin_name }}/" - name: "Download Python client docs" - uses: "actions/download-artifact@v3" + uses: "actions/download-artifact@v4" with: name: "python-client-docs.tar" path: "{{ plugin_name }}/" diff --git a/templates/github/.github/workflows/test.yml.j2 b/templates/github/.github/workflows/test.yml.j2 index 0ad31718..572bf6fb 100644 --- a/templates/github/.github/workflows/test.yml.j2 +++ b/templates/github/.github/workflows/test.yml.j2 @@ -48,7 +48,7 @@ jobs: {{ setup_python() | indent(6) }} - - uses: "actions/download-artifact@v3" + - uses: "actions/download-artifact@v4" with: name: "plugin_package" path: "{{ plugin_name }}/dist/" @@ -81,9 +81,9 @@ jobs: docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-{{ "${{ matrix.env.TEST }}" }}.txt - name: "Upload Deprecations" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: "deprecations" + name: "deprecations-{{ '${{ matrix.env.TEST }}' }}" path: "{{ plugin_name }}/deprecations-{{ '${{ matrix.env.TEST }}' }}.txt" if-no-files-found: "error" retention-days: 5 @@ -92,7 +92,7 @@ jobs: {%- for plugin in plugins %} - name: Upload python client packages if: {{ "${{ env.TEST == 'pulp' }}" }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "python-client.tar" path: "{{ plugin_name }}/{{ plugin.app_label }}-python-client.tar" @@ -101,7 +101,7 @@ jobs: - name: Upload python client docs if: {{ "${{ env.TEST == 'pulp' }}" }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "python-client-docs.tar" path: "{{ plugin_name }}/{{ plugin.app_label }}-python-client-docs.tar" @@ -111,7 +111,7 @@ jobs: {%- if deploy_client_to_rubygems %} - name: Upload Ruby client if: {{ "${{ env.TEST == 'pulp' }}" }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "ruby-client.tar" path: "{{ plugin_name }}/{{ plugin.app_label }}-ruby-client.tar" @@ -123,7 +123,7 @@ jobs: {%- if docs_test %} - name: Upload built docs if: {{ "${{ env.TEST == 'docs' }}" }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "docs.tar" path: "{{ plugin_name }}/docs/docs.tar" diff --git a/templates/macros.j2 b/templates/macros.j2 index 39d755a4..d0092075 100644 --- a/templates/macros.j2 +++ b/templates/macros.j2 @@ -34,7 +34,7 @@ GITHUB_CONTEXT: "{{ '${{ github.event.pull_request.commits_url }}' }}" {%- macro setup_python(pyversion=python_version) -%} -- uses: "actions/setup-python@v4" +- uses: "actions/setup-python@v5" with: python-version: "{{ pyversion }}" {%- endmacro -%}