From bccb8a76b2676250cdf018655423359d0f840ac8 Mon Sep 17 00:00:00 2001 From: Philipp Schlarb Date: Tue, 18 Apr 2023 17:32:42 +0200 Subject: [PATCH] switched to shared-gha & fixed repo reference Signed-off-by: Philipp Schlarb --- .github/workflows/publishRelease.yaml | 45 +++++++++------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publishRelease.yaml b/.github/workflows/publishRelease.yaml index f9d0a8a0d..5abf5a2d0 100644 --- a/.github/workflows/publishRelease.yaml +++ b/.github/workflows/publishRelease.yaml @@ -120,48 +120,33 @@ jobs: INDY_ARTIFACTORY_REPO_CONFIG: ${{ secrets.INDY_ARTIFACTORY_REPO_CONFIG }} PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + convertPyVersion: + name: "Convert to python version flavour" + needs: [release-infos, publish_artifacts] + uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v1 + with: + VERSIONTAG: ${{ needs.release-infos.outputs.VERSIONTAG }} + triggerSovrinUpdate: runs-on: ubuntu-latest - needs: [release-infos, publish_artifacts] + needs: [release-infos, publish_artifacts, convertPyVersion] steps: - - name: Convert to python version flavour - id: conversion - run: | - pyVersion=$(echo ${{ needs.release-infos.outputs.VERSIONTAG }} | sed 's~v~~g') - if [[ ${{ needs.release-infos.outputs.VERSIONTAG }} == *"-"* ]]; then - pyVersion=$(echo $pyVersion | sed 's~-~.~g') - echo "pyVersion=$pyVersion">> $GITHUB_OUTPUT - else - echo "pyVersion=$pyVersion" >> $GITHUB_OUTPUT - fi - echo "debVersion=$(echo $pyVersion | sed -E 's/^([^\.]*\.[^\.]*\.[^\.]*)\.(.*)$/\1~\2/')" >> $GITHUB_OUTPUT - name: Repository Dispatch uses: peter-evans/repository-dispatch@v2 with: - token: ${{ secrets.BOT_PR_PAT_NODE }} - repository: pschlarb/sovrin + token: ${{ secrets.BOT_PR_PAT }} + repository: sovrin-foundation/sovrin event-type: update-sovrin - client-payload: '{"pyVersion": "${{ steps.conversion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}' + client-payload: '{"pyVersion": "${{ needs.convertPyVersion.outputs.pyVersion }}", "debVersion": "${{ needs.convertPyVersion.debVersion }}", "email":"${{ github.event.pusher.email }}"}' triggerTokenUpdate: runs-on: ubuntu-latest - needs: [release-infos, publish_artifacts] + needs: [release-infos, publish_artifacts, convertPyVersion] steps: - - name: Convert to python version flavour - id: conversion - run: | - pyVersion=$(echo ${{ needs.release-infos.outputs.VERSIONTAG }} | sed 's~v~~g') - if [[ ${{ needs.release-infos.outputs.VERSIONTAG }} == *"-"* ]]; then - pyVersion=$(echo $pyVersion | sed 's~-~.~g') - echo "pyVersion=$pyVersion">> $GITHUB_OUTPUT - else - echo "pyVersion=$pyVersion" >> $GITHUB_OUTPUT - fi - echo "debVersion=$(echo $pyVersion | sed -E 's/^([^\.]*\.[^\.]*\.[^\.]*)\.(.*)$/\1~\2/')" >> $GITHUB_OUTPUT - name: Repository Dispatch uses: peter-evans/repository-dispatch@v2 with: - token: ${{ secrets.BOT_PR_PAT_NODE }} - repository: pschlarb/token-plugin-1 + token: ${{ secrets.BOT_PR_PAT }} + repository: sovrin-foundation/token-plugin-1 event-type: update-token-plugin - client-payload: '{"pyVersion": "${{ steps.conversion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}' \ No newline at end of file + client-payload: '{"pyVersion": "${{ needs.convertPyVersion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}' \ No newline at end of file