-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Boost backers' rewards in an active NFT campaign | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
campaignId: | ||
description: 'The ID of the active NFT campaign' | ||
required: true | ||
amount: | ||
description: 'The amount of backers to boost' | ||
required: true | ||
nft: | ||
description: 'The address of the NFT contract' | ||
required: true | ||
|
||
jobs: | ||
boost: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Switch to target branch for data | ||
run: | | ||
git fetch origin | ||
git checkout -B boost-data | ||
- name: Boost backers' rewards | ||
env: | ||
BOOSTER_PRIVATE_KEY: ${{ secrets.BOOSTER_PRIVATE_KEY }} | ||
BOOSTER_RPC_URL: ${{ secrets.BOOSTER_RPC_URL }} | ||
BOOSTER_CHAIN_ID: ${{ secrets.BOOSTER_CHAIN_ID }} | ||
run: | | ||
npx tsx ./github/.scripts/boost.ts \ | ||
--campaignId ${{ github.event.inputs.campaignId }} \ | ||
--amount ${{ github.event.inputs.amount }} \ | ||
--nft ${{ github.event.inputs.nft }} | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
# Stage all changes | ||
git add . | ||
# Create a commit; if there are no changes, this command will fail, so we ignore that error. | ||
git commit -m "Add files generated by boost script" || echo "No changes to commit" | ||
# Push the commit back to the current branch | ||
git push |