Skip to content

Commit

Permalink
dispatch token update
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Schlarb <[email protected]>
  • Loading branch information
pSchlarb committed Apr 18, 2023
1 parent af82462 commit eabaa17
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/manualDispatchTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,27 @@ jobs:
token: ${{ secrets.BOT_PR_PAT_NODE }}
repository: pschlarb/sovrin
event-type: update-sovrin
client-payload: '{"pyVersion": "${{ steps.conversion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}'

triggerTokenUpdate:
runs-on: ubuntu-latest
needs: [taginfos]
steps:
- name: Convert to python version flavour
id: conversion
run: |
pyVersion=$(echo ${{ needs.taginfos.outputs.VERSIONTAG }} | sed 's~v~~g')
if [[ ${{ needs.taginfos.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
event-type: update-token-plugin
client-payload: '{"pyVersion": "${{ steps.conversion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}'
23 changes: 23 additions & 0 deletions .github/workflows/publishRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,27 @@ jobs:
token: ${{ secrets.BOT_PR_PAT_NODE }}
repository: pschlarb/sovrin
event-type: update-sovrin
client-payload: '{"pyVersion": "${{ steps.conversion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}'

triggerTokenUpdate:
runs-on: ubuntu-latest
needs: [release-infos, publish_artifacts]
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
event-type: update-token-plugin
client-payload: '{"pyVersion": "${{ steps.conversion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}'

0 comments on commit eabaa17

Please sign in to comment.