Skip to content

Commit

Permalink
switched to shared-gha & fixed repo reference
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Schlarb <p.schlarb@esatus.com>
  • Loading branch information
pSchlarb committed Apr 19, 2023
1 parent c86f61e commit 3e038da
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions .github/workflows/publishRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
event-type: update-token-plugin
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": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}'

0 comments on commit 3e038da

Please sign in to comment.