Skip to content

Commit 199ca35

Browse files
committed
ci: Fix pull request step
1 parent 9459134 commit 199ca35

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.github/workflows/sharing-smart-contract-deploy.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ jobs:
3535
environment: ${{ inputs.network }}
3636
permissions:
3737
contents: write # Required to commit deployment files.
38+
pull-requests: write # Required to create pull requests.
3839
env:
3940
CI: true
4041
# For commit action
41-
COMMIT_MESSAGE: 'chore: Save deployment artifacts for ${{ inputs.network }} ${{ inputs.stage }} (${{ github.run_id }})'
42+
COMMIT_MESSAGE: 'chore: Save deployment artifacts - ${{ inputs.network }} ${{ inputs.stage }} (${{ github.run_id }})'
4243
GHA_BOT_NAME: 'GitHub Actions Bot'
4344
GHA_BOT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
44-
# commit_author: 'GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>'
4545

4646
steps:
47-
- name: Validate deployment environment
47+
- name: Validate target environment
48+
id: validate-env
4849
if: inputs.network != 'hardhat'
4950
env:
5051
NETWORK: ${{ inputs.network }}
@@ -90,10 +91,10 @@ jobs:
9091
- name: Deploy contracts
9192
working-directory: packages/sharing-smart-contract
9293
env:
93-
# For Deployment
94+
DEPLOYMENT_ID: ${{ steps.validate-env.outputs.deployment-id }}
9495
RPC_URL: ${{ secrets.RPC_URL }}
9596
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
96-
ADMIN_PRIVATE_KEY: ${{ secrets.DATAPROTECTOR_OWNER_PRIVATEKEY }} # Fix secret name
97+
ADMIN_PRIVATE_KEY: ${{ secrets.DATAPROTECTOR_OWNER_PRIVATEKEY }} # TODO Fix secret name
9798
POCO_ADDRESS: ${{ vars.POCO_ADDRESS }}
9899
DATASET_REGISTRY_ADDRESS: ${{ vars.DATASET_REGISTRY_ADDRESS }}
99100
run: |
@@ -105,7 +106,9 @@ jobs:
105106
uses: stefanzweifel/git-auto-commit-action@v5
106107
with:
107108
commit_message: ${{ env.COMMIT_MESSAGE }}
108-
file_pattern: 'packages/sharing-smart-contract/ignition/deployments/* packages/sharing-smart-contract/.openzeppelin/*'
109+
file_pattern: |
110+
packages/sharing-smart-contract/ignition/deployments/*
111+
packages/sharing-smart-contract/.openzeppelin/*
109112
commit_user_name: ${{ env.GHA_BOT_NAME }}
110113
commit_user_email: ${{ env.GHA_BOT_EMAIL }}
111114
commit_author: '${{ env.GHA_BOT_NAME }} <${{ env.GHA_BOT_EMAIL }}>'
@@ -116,8 +119,10 @@ jobs:
116119
uses: peter-evans/create-pull-request@v7
117120
with:
118121
commit-message: ${{ env.COMMIT_MESSAGE }}
119-
add-paths: 'packages/sharing-smart-contract/ignition/deployments/* packages/sharing-smart-contract/.openzeppelin/*'
120-
committer: ${{ env.GHA_BOT_NAME }}
122+
add-paths: |
123+
packages/sharing-smart-contract/ignition/deployments/
124+
packages/sharing-smart-contract/.openzeppelin/
125+
committer: '${{ env.GHA_BOT_NAME }} <${{ env.GHA_BOT_EMAIL }}>'
121126
author: '${{ env.GHA_BOT_NAME }} <${{ env.GHA_BOT_EMAIL }}>'
122127
branch: chore/save-deployment-artifacts
123128
title: ${{ env.COMMIT_MESSAGE }}

.github/workflows/sharing-smart-contracts-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ jobs:
8989
- name: Upgrade test
9090
working-directory: packages/sharing-smart-contract
9191
env:
92-
DATA_PROTECTOR_SHARING_ADDRESS: 0x1390c3c6a545198809F1C7c5Dd2600ef74D60925
93-
ADD_ONLY_APP_WHITELIST_REGISTRY_ADDRESS: 0x498D324F711b8998Be81818742e268dEE30347c6
92+
DATA_PROTECTOR_SHARING_ADDRESS: '0x1390c3c6a545198809F1C7c5Dd2600ef74D60925'
93+
ADD_ONLY_APP_WHITELIST_REGISTRY_ADDRESS: '0x498D324F711b8998Be81818742e268dEE30347c6'
9494
run: npm run upgrade-local-fork -- --network local-bellecour-fork
9595

9696
# TODO check why the CI does not fail when the following error occurs

0 commit comments

Comments
 (0)