Skip to content

Commit

Permalink
Merge pull request #352 from pSchlarb/RepoDispatches
Browse files Browse the repository at this point in the history
Repo dispatches
  • Loading branch information
pSchlarb authored Apr 19, 2023
2 parents dd82ec4 + b9c151c commit bfdbd5b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BC8C2DD662F1C45 &&
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88

RUN add-apt-repository "deb https://sovrin.jfrog.io/artifactory/deb focal dev"
RUN add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc"
RUN add-apt-repository "deb https://sovrin.jfrog.io/artifactory/deb focal dev rc master"
RUN add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc master"

RUN apt-get update

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/repoDispatchable_updateNodeDependency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Repo Dispatched Update Node Dependecy

on:
repository_dispatch:
types: [update-sovrin]

jobs:
update-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update indy-node to ${{ github.event.client_payload.pyVersion }}
run: |
sed -i "s/\(indy-node==\)[^ ]*/\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.client_payload.email }}>
signoff: true
committer: ${{ github.actor }} <${{ github.event.client_payload.email }}>
commit-message: "Automated Update to indy-node==${{ github.event.client_payload.pyVersion }}"
title: "Automated Update to indy-node==${{ github.event.client_payload.pyVersion }}"
body: "This PR updates the indy-node version in `setup.py` to use `indy-node==${{ github.event.client_payload.pyVersion }}`."
branch: "NodeUpdates"
delete-branch: true
base: "master"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Repo Dispatched Update Node Dependecy

on:
repository_dispatch:
types: [update-sovrin-token]

jobs:
update-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update indy-node to ${{ github.event.client_payload.pyVersion }}
run: |
sed -i "s/\(sovtoken==\)[^ ]*/\1${{ github.event.client_payload.pyVersion }}',/g" setup.py
sed -i "s/\(sovtokenfees==\)[^ ]*/\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.client_payload.email }}>
signoff: true
committer: ${{ github.actor }} <${{ github.event.client_payload.email }}>
commit-message: "Automated Update to indy-node==${{ github.event.client_payload.pyVersion }}"
title: "Automated Update to indy-node==${{ github.event.client_payload.pyVersion }}"
body: "This PR updates the indy-node version in `setup.py` to use `indy-node==${{ github.event.client_payload.pyVersion }}`."
branch: "Token-Pluging-Updates"
delete-branch: true
base: "master"
2 changes: 0 additions & 2 deletions updateVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def updateWithTag(ver):
raise ValueError('No Valid Semver in Tag')
return ver


def updateWithTimestamp(timestamp):
version = "str"
with open(sovrinMetadata, 'r') as f:
Expand Down Expand Up @@ -51,5 +50,4 @@ def updateWithTimestamp(timestamp):
data["version"] = version
json.dump(data, open(sovrinMetadata, "w"), indent=2)


print("Updated version of sovrin metadata.json to: ", version)

0 comments on commit bfdbd5b

Please sign in to comment.