Skip to content

Commit

Permalink
wip.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Dec 19, 2024
1 parent 94ec24f commit 999e799
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/auto-deploy-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
paths:
- contracts/**

permissions:
contents: write

env:
GIT_USERNAME: github-actions[bot]
GIT_EMAIL: ipc+github-actions[bot]@users.noreply.github.com
Expand All @@ -21,7 +24,7 @@ jobs:
deploy-contracts:
runs-on: ubuntu-latest
env:
RPC_URL: https://calibration.filfox.info/rpc/v1
RPC_URL: https://calibration.filfox.io/rpc/v1
PRIVATE_KEY: ${{ secrets.CONTRACTS_DEPLOYER_PRIVATE_KEY }}
steps:
- name: Checkout cd/contracts branch
Expand All @@ -30,7 +33,6 @@ jobs:
ref: cd/contracts
submodules: recursive
fetch-depth: 0
token: ${{ secrets.WORKFLOW_PAT_JIE }}

- name: (Dry run) Try merge from main branch to see if there's any conflicts that can't be resolved itself
run: |
Expand Down Expand Up @@ -61,11 +63,11 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Deploy IPC contracts to calibration net
- name: Deploy IPC contracts to Calibrationnet
id: deploy_contracts
run: |
cd contracts
npm install --save hardhat
npm install
output=$(make deploy-stack NETWORK=calibrationnet)
echo "deploy_output<<EOF" >> $GITHUB_OUTPUT
echo "$output" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -93,7 +95,6 @@ jobs:
ref: cd/contracts
submodules: recursive
fetch-depth: 0
token: ${{ secrets.WORKFLOW_PAT_JIE }}

- name: Merge from main branch and update cd/contracts branch
run: |
Expand All @@ -113,13 +114,10 @@ jobs:
cat deployments/r314159.json
- name: Commit output file and push it to remote repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update contract address
branch: cd/contracts
file_pattern: deployments/r314159.json
commit_user_name: ${{env.GIT_USERNAME}}
commit_user_email: ${{env.GIT_EMAIL}}
push_options: '--force'
skip_dirty_check: true
create_branch: true
uses: actions/checkout@v4
run: |
git config user.name ${{env.GIT_USERNAME}}
git config user.email ${{env.GIT_EMAIL}}
git add deployments/r314159.json
git commit -m "Update contract address"
git push origin cd/contracts

0 comments on commit 999e799

Please sign in to comment.