From f358c1bb36dad8c860b44ea0c8f2d204947b8578 Mon Sep 17 00:00:00 2001 From: jamshale <31809382+jamshale@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:08:07 -0800 Subject: [PATCH] Patch PR 3391 - 0.12.lts (#3396) * Backport PR 3391 Signed-off-by: jamshale * Change pypi publish workflow Signed-off-by: jamshale --------- Signed-off-by: jamshale --- .github/workflows/publish.yml | 12 +++--------- .github/workflows/pythonpublish.yml | 15 +++++++++------ aries_cloudagent/askar/profile.py | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8195dc1b7c..345cb595e0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -51,12 +51,6 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ inputs.ref || '' }} - - - name: Gather image info - id: info - run: | - echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT - - name: Cache Docker layers uses: actions/cache@v4 with: @@ -72,15 +66,15 @@ jobs: uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + username: hyperledger + password: ${{ secrets.HYPERLEDGER_GHCR_PAT }} - name: Setup Image Metadata id: meta uses: docker/metadata-action@v5 with: images: | - ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python + ghcr.io/hyperledger/aries-cloudagent-python tags: | type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }} diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 8211541fbe..5ff1cca8dd 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -7,20 +7,23 @@ on: jobs: deploy: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/aries-cloudagent + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.x" - - name: Install dependencies + python-version: "3.9" + - name: Install build and publish dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine poetry - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | poetry build - twine upload dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/aries_cloudagent/askar/profile.py b/aries_cloudagent/askar/profile.py index b07dcf1f6b..bbe9deae76 100644 --- a/aries_cloudagent/askar/profile.py +++ b/aries_cloudagent/askar/profile.py @@ -118,7 +118,7 @@ def bind_providers(self): VCHolder, ClassProvider( "aries_cloudagent.storage.vc_holder.askar.AskarVCHolder", - ref(self), + ClassProvider.Inject(Profile), ), ) if (