-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a path variable to the actions
- Loading branch information
1 parent
33d5b79
commit afa9a30
Showing
3 changed files
with
165 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,12 @@ This GitHub Action allows you to automate smart contract deployments across mult | |
|
||
## 🛠️ Inputs | ||
|
||
| Name | Description | Required | | ||
| ---------------- | ---------------------------------- | -------- | | ||
| `network` | List of networks to deploy on, with `chainId` and optional `blockNumber`. Example format provided below. | `true` | | ||
| `deployCmd` | Command to deploy the contract, such as `make deploy`. | `true` | | ||
| `buildbear_token`| Your BuildBear API token for authentication. | `true` | | ||
| Name | Description | Required | | ||
| ------------------ | -------------------------------------------------------------------------------------------------------- | -------- | | ||
| `network` | List of networks to deploy on, with `chainId` and optional `blockNumber`. Example format provided below. | `true` | | ||
| `deploy-command` | Command to deploy the contract, such as `make deploy`. | `true` | | ||
| `buildbear-token` | Your BuildBear API token for authentication. | `true` | | ||
| `working-directory`| Path to the directory containing the project. Default is the root directory. | `false` | | ||
|
||
### Example `network` Input Format | ||
|
||
|
@@ -67,7 +68,7 @@ jobs: | |
|
||
- name: Run BB Action CI | ||
uses: BuildBearLabs/[email protected] | ||
with: | ||
with: | ||
network: | | ||
[ | ||
{ | ||
|
@@ -78,20 +79,20 @@ jobs: | |
"chainId": 10 | ||
} | ||
] | ||
deployCmd: "make deploy" | ||
buildbear_token: "${{ secrets.BUILDBEAR_TOKEN }}" | ||
deploy-command: "make deploy" | ||
buildbear-token: "${{ secrets.BUILDBEAR_TOKEN }}" | ||
``` | ||
> **Note:** Ensure that the `buildbear_token` is securely stored as a secret in your GitHub repository under `BUILDBEAR_TOKEN`. | ||
> **Note:** Ensure that the `buildbear-token` is securely stored as a secret in your GitHub repository under `BUILDBEAR_TOKEN`. | ||
|
||
## 📚 Tutorial | ||
|
||
1. **Set up GitHub Secrets**: Add your BuildBear API token as a secret in your repository settings. | ||
2. **Define Networks**: In the `network` input, specify the networks and optional block numbers for deployment. | ||
3. **Add Deployment Command**: Define the deployment command under `deployCmd`. | ||
3. **Add Deployment Command**: Define the deployment command under `deploy-command`. | ||
4. **Run Workflow**: Trigger the workflow on push or any specified event to deploy contracts on the selected networks. | ||
|
||
## 📘 Additional Notes | ||
|
||
- Ensure the `deployCmd` matches the command in your project for deploying contracts. | ||
- This action requires Node.js 20 (`node20`) to run the main deployment script. | ||
- Ensure the `deploy-command` matches the command in your project for deploying contracts. | ||
- This action requires Node.js 20 (`node20`) to run the main deployment script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
name: 'bb_ci' | ||
description: 'automate smart contract deployments across multiple networks using BuildBear’s sandbox' | ||
name: "bb_ci" | ||
description: "automate smart contract deployments across multiple networks using BuildBear’s sandbox" | ||
|
||
inputs: | ||
network: | ||
description: 'List of networks you want to deploy on' | ||
description: "List of networks you want to deploy on" | ||
required: true | ||
deployCmd: | ||
description: 'Command to deploy the contract' | ||
deploy-command: | ||
description: "Command to deploy the contract" | ||
required: true | ||
buildbear_token: | ||
buildbear-token: | ||
description: "Buildbear API token" | ||
required: true | ||
working-directory: | ||
description: "Project directory" | ||
required: false | ||
default: "." | ||
|
||
outputs: | ||
deployments: | ||
description: 'deployments logs' | ||
description: "deployments logs" | ||
|
||
runs: | ||
using: 'node20' | ||
main: 'index.js' | ||
using: "node20" | ||
main: "index.js" | ||
|
||
branding: | ||
icon: 'bold' | ||
color: 'green' | ||
icon: "bold" | ||
color: "green" |
Oops, something went wrong.