Skip to content

Commit

Permalink
Merge pull request #1812 from pSchlarb/SovrinUpdates
Browse files Browse the repository at this point in the history
Repo Dispatches and dispatchable WF-Runs
  • Loading branch information
pSchlarb authored Apr 19, 2023
2 parents a26aad7 + 3e038da commit 9900b86
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 83 deletions.
83 changes: 0 additions & 83 deletions .github/workflows/WIPupdatePlenumDependency

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publishRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,34 @@ jobs:
secrets:
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, convertPyVersion]
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.BOT_PR_PAT }}
repository: sovrin-foundation/sovrin
event-type: update-sovrin
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, convertPyVersion]
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.BOT_PR_PAT }}
repository: sovrin-foundation/token-plugin
event-type: update-token-plugin
client-payload: '{"pyVersion": "${{ needs.convertPyVersion.outputs.pyVersion }}", "debVersion": "${{ steps.conversion.outputs.debVersion }}", "email":"${{ github.event.pusher.email }}"}'
28 changes: 28 additions & 0 deletions .github/workflows/repoDispatchable_UpdatePlenumDependency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Repo Dispatched Update Plenum Dependecy

on:
repository_dispatch:
types: [update-node]

jobs:
update-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update indy-plenum to ${{ github.event.client_payload.pyVersion }}
run: |
sed -i "s/\(indy-plenum==\)[^ ]*/\1${{ github.event.client_payload.pyVersion }},/g" setup.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
author: ${{ github.actor }} <${{ github.event.pusher.email }}>
signoff: true
committer: ${{ github.actor }} <${{ github.event.pusher.email }}>
commit-message: "Automated Update to indy-plenum==$pyVersion"
title: "Automated Update to indy-plenum==$pyVersion"
body: "This PR updates the indy-plenum version in `setup.py` to use `indy-plenum==$pyVersion`."
branch: "PlenumUpdates"
delete-branch: true
base: "DependencyUpdateTrigger"

0 comments on commit 9900b86

Please sign in to comment.