Skip to content

Commit c623725

Browse files
authored
Merge pull request #243 from sanvenDev/main
Minor Fixes in workflows and dependabot updates
2 parents 3a335e8 + d18e251 commit c623725

25 files changed

+9231
-9879
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Deploy Corda Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'common/protos-java-kt/gradle.properties'
9+
- 'core/network/corda-interop-app/gradle.properties'
10+
- 'sdks/corda/gradle.properties'
11+
- 'core/drivers/corda-driver/makefile.variables.docker'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
jobs:
17+
publish-protos:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Set up JDK 8
24+
uses: actions/setup-java@v2
25+
with:
26+
java-version: '8'
27+
distribution: 'adopt'
28+
29+
- name: Generate github.properties
30+
run: |
31+
echo "Using ${GITHUB_ACTOR} user."
32+
echo "username=${GITHUB_ACTOR}" >> github.properties
33+
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
34+
echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/weaver-dlt-interoperability" >> github.properties
35+
cat github.properties
36+
working-directory: common/protos-java-kt
37+
38+
- name: Build
39+
run: make build
40+
working-directory: common/protos-java-kt
41+
42+
- name: Publish
43+
run: make publish
44+
working-directory: common/protos-java-kt
45+
46+
47+
publish-interop-app:
48+
needs: publish-protos
49+
runs-on: ubuntu-latest
50+
steps:
51+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
52+
- uses: actions/checkout@v2
53+
54+
- name: Set up JDK 8
55+
uses: actions/setup-java@v2
56+
with:
57+
java-version: '8'
58+
distribution: 'adopt'
59+
60+
- name: Generate github.properties
61+
run: |
62+
echo "Using ${GITHUB_ACTOR} user."
63+
echo "username=${GITHUB_ACTOR}" >> github.properties
64+
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
65+
echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/weaver-dlt-interoperability" >> github.properties
66+
cat github.properties
67+
working-directory: core/network/corda-interop-app
68+
69+
- name: Build
70+
run: make build
71+
working-directory: core/network/corda-interop-app
72+
73+
- name: Publish
74+
run: make publish
75+
working-directory: core/network/corda-interop-app
76+
77+
publish-sdk:
78+
needs: [publish-protos, publish-interop-app]
79+
runs-on: ubuntu-latest
80+
steps:
81+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
82+
- uses: actions/checkout@v2
83+
84+
- name: Set up JDK 8
85+
uses: actions/setup-java@v2
86+
with:
87+
java-version: '8'
88+
distribution: 'adopt'
89+
90+
- name: Generate github.properties
91+
run: |
92+
echo "Using ${GITHUB_ACTOR} user."
93+
echo "username=${GITHUB_ACTOR}" >> github.properties
94+
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
95+
echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/weaver-dlt-interoperability" >> github.properties
96+
cat github.properties
97+
working-directory: sdks/corda
98+
99+
- name: Build
100+
run: make build
101+
working-directory: sdks/corda
102+
103+
- name: Publish
104+
run: make publish
105+
working-directory: sdks/corda
106+
107+
publish-driver:
108+
needs: [publish-protos, publish-interop-app]
109+
runs-on: ubuntu-latest
110+
steps:
111+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
112+
- uses: actions/checkout@v2
113+
114+
- name: Login to GitHub Container Registry
115+
uses: docker/login-action@v1
116+
with:
117+
registry: ghcr.io
118+
username: ${{ github.actor }}
119+
password: ${{ secrets.GITHUB_TOKEN }}
120+
121+
- name: Generate github.properties
122+
run: |
123+
echo "Using ${GITHUB_ACTOR} user."
124+
echo "username=${GITHUB_ACTOR}" >> github.properties
125+
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
126+
echo "url=https://maven.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/weaver-dlt-interoperability" >> github.properties
127+
cat github.properties
128+
working-directory: core/drivers/corda-driver
129+
130+
- name: Build and Push
131+
run: make push-image
132+
working-directory: core/drivers/corda-driver
133+
134+

.github/workflows/deploy_docs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
branches:
66
- main
77
paths:
8-
- docs/**
8+
- 'docs/**'
99

1010
# Allows you to run this workflow manually from the Actions tab
1111
workflow_dispatch:
1212

1313
jobs:
14-
build:
14+
deploy-docs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -31,6 +31,8 @@ jobs:
3131
working-directory: docs
3232

3333
- name: Deploy
34-
run: npm run deploy-gh-pages
35-
working-directory: docs
34+
uses: JamesIves/[email protected]
35+
with:
36+
branch: gh-pages # The branch the action should deploy to.
37+
folder: docs/build # The folder the action should deploy.
3638

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Deploy Fabric Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'common/protos-js/package.json'
9+
- 'sdks/fabric/interoperation-node-sdk/package.json'
10+
- 'core/drivers/fabric-driver/makefile.variables.docker'
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
publish-protos:
17+
runs-on: ubuntu-latest
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v2
21+
22+
- name: Use Node.js 14.x
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: 14.x
26+
27+
- name: Use Protoc 3.15
28+
run: |
29+
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip
30+
unzip protoc-3.15.6-linux-x86_64.zip -d protoc
31+
32+
- name: Generate .npmrc
33+
run: |
34+
cp .npmrc.template .npmrc
35+
sed -i "s/<personal-access-token>/${{ secrets.GITHUB_TOKEN }}/g" .npmrc
36+
cat .npmrc
37+
working-directory: common/protos-js
38+
39+
- name: Build
40+
run: |
41+
export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin"
42+
make build
43+
working-directory: common/protos-js
44+
45+
- name: Publish
46+
run: make publish
47+
working-directory: common/protos-js
48+
49+
publish-sdk:
50+
needs: [publish-protos]
51+
runs-on: ubuntu-latest
52+
steps:
53+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
54+
- uses: actions/checkout@v2
55+
56+
- name: Use Node.js 14.x
57+
uses: actions/setup-node@v2
58+
with:
59+
node-version: 14.x
60+
61+
- name: Generate .npmrc
62+
run: |
63+
cp .npmrc.template .npmrc
64+
sed -i "s/<personal-access-token>/${{ secrets.GITHUB_TOKEN }}/g" .npmrc
65+
cat .npmrc
66+
working-directory: sdks/fabric/interoperation-node-sdk
67+
68+
- name: Build
69+
run: make build
70+
working-directory: sdks/fabric/interoperation-node-sdk
71+
72+
- name: Publish
73+
run: make publish
74+
working-directory: sdks/fabric/interoperation-node-sdk
75+
76+
publish-driver:
77+
needs: [publish-protos]
78+
runs-on: ubuntu-latest
79+
steps:
80+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
81+
- uses: actions/checkout@v2
82+
83+
- name: Login to GitHub Container Registry
84+
uses: docker/login-action@v1
85+
with:
86+
registry: ghcr.io
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
89+
90+
- name: Generate .npmrc
91+
run: |
92+
cp .npmrc.template .npmrc
93+
sed -i "s/<personal-access-token>/${{ secrets.GITHUB_TOKEN }}/g" .npmrc
94+
cat .npmrc
95+
working-directory: core/drivers/fabric-driver
96+
97+
- name: Build and Push
98+
run: make push-image
99+
working-directory: core/drivers/fabric-driver
100+
101+
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy General Go Module
2+
3+
on:
4+
# Allows you to run this workflow manually from the Actions tab
5+
workflow_dispatch:
6+
inputs:
7+
module:
8+
description: 'Go Module name'
9+
default: 'protos-go'
10+
required: true
11+
version:
12+
description: 'Version for Go Release'
13+
default: 'v0.0.0'
14+
required: true
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Set current date as env
24+
run: echo "RELEASE_DATE=$(date +%b\ %d,\ %Y)" >> $GITHUB_ENV
25+
26+
- name: Get Full path
27+
run: |
28+
if [ "${{ github.event.inputs.module }}" = "protos-go" ]; then
29+
echo "MODULE_TAG=common/protos-go" >> $GITHUB_ENV
30+
echo "MODULE_DESC=GO Weaver Protos" >> $GITHUB_ENV
31+
elif [ "${{ github.event.inputs.module }}" = "interop" ]; then
32+
echo "MODULE_TAG=core/network/fabric-interop-cc/contracts/interop" >> $GITHUB_ENV
33+
echo "MODULE_DESC=GO Fabric Interop Chaincode" >> $GITHUB_ENV
34+
elif [ "${{ github.event.inputs.module }}" = "utils" ]; then
35+
echo "MODULE_TAG=core/network/fabric-interop-cc/libs/utils" >> $GITHUB_ENV
36+
echo "MODULE_DESC=GO Fabric Utils Library for Interoperation" >> $GITHUB_ENV
37+
elif [ "${{ github.event.inputs.module }}" = "assetexchange" ]; then
38+
echo "MODULE_TAG=core/network/fabric-interop-cc/libs/assetexchange" >> $GITHUB_ENV
39+
echo "MODULE_DESC=GO Fabric Library for Asset Exchange" >> $GITHUB_ENV
40+
elif [ "${{ github.event.inputs.module }}" = "asset-mgmt" ]; then
41+
echo "MODULE_TAG=core/network/fabric-interop-cc/interfaces/asset-mgmt" >> $GITHUB_ENV
42+
echo "MODULE_DESC=GO Fabric Asset Management Interface" >> $GITHUB_ENV
43+
elif [ "${{ github.event.inputs.module }}" = "go-sdk" ]; then
44+
echo "MODULE_TAG=sdks/fabric/go-sdk" >> $GITHUB_ENV
45+
echo "MODULE_DESC=GO Fabric Weaver SDK" >> $GITHUB_ENV
46+
else
47+
echo "Module not known to the workflow. Exiting."
48+
exit 1
49+
fi
50+
51+
- name: Create GO Release
52+
id: go-release
53+
uses: actions/create-release@v1
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
56+
with:
57+
tag_name: ${{ env.MODULE_TAG }}/${{ github.event.inputs.version }}
58+
release_name: ${{ github.event.inputs.version }} - ${{ env.MODULE_DESC }} - ${{ env.RELEASE_DATE }}
59+
body: |
60+
- Go Module: `github.com/${{ github.repository_owner }}/weaver-dlt-interoperability/${{ env.MODULE_TAG }}`
61+
- Release: ${{ github.event.inputs.version }}
62+
- Readme: [Here](https://github.com/${{ github.repository_owner }}/weaver-dlt-interoperability/blob/${{ env.MODULE_TAG }}/${{ github.event.inputs.version }}/${{ env.MODULE_TAG }}/README.md).
63+
- Source: [Here](https://github.com/${{ github.repository_owner }}/weaver-dlt-interoperability/blob/${{ env.MODULE_TAG }}/${{ github.event.inputs.version }}/${{ env.MODULE_TAG }})
64+
draft: false
65+
prerelease: false
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy Relay Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'core/relay/Makefile.variables.docker'
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
relay-image:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
18+
- uses: actions/checkout@v2
19+
20+
- name: Login to GitHub Container Registry
21+
uses: docker/login-action@v1
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Build and Push
28+
run: make push-server
29+
working-directory: core/relay

.github/workflows/test_asset-exchange-corda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: Asset Exchange Corda Tests
3+
name: Test Asset Exchange Corda
44

55
# Controls when the workflow will run
66
on:

0 commit comments

Comments
 (0)