Skip to content

Commit

Permalink
feat(cr_booster): add GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed Feb 11, 2025
1 parent 104cea3 commit e18a194
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/booster.yaml
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

0 comments on commit e18a194

Please sign in to comment.