GitHub Actions Integration

Automate BACON Rewards with CI/CD

Quick Setup

1

Add Secrets to Repository

Go to Settings → Secrets and variables → Actions, and add:

  • BACON_PRIVATE_KEY: Your wallet private key
  • BACON_TOKEN_MINT: Token mint address (Solana) or token ID (Bitcoin)
  • BLOCKCHAIN_NETWORK: Network to use (mainnet/testnet)
2

Create Workflow File

Create .github/workflows/bacon-rewards.yml

3

Configure Rewards

Customize reward amounts based on your needs

Example Workflows

Basic Issue and PR Rewards

name: BACON Rewards

on:
  issues:
    types: [opened, closed]
  pull_request:
    types: [opened, closed]

jobs:
  reward:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Reward Contributor
        uses: OWASP-BLT/bacon-action@v1
        with:
          blockchain: 'solana'
          network: 'mainnet-beta'
          private-key: ${{ secrets.BACON_PRIVATE_KEY }}
          token-mint: ${{ secrets.BACON_TOKEN_MINT }}
          reward-issue-opened: 10
          reward-issue-closed: 5
          reward-pr-opened: 20
          reward-pr-merged: 50

Advanced Conditional Rewards

name: BACON Advanced Rewards

on:
  pull_request:
    types: [closed]

jobs:
  reward-pr:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      - uses: OWASP-BLT/bacon-action@v1
        with:
          blockchain: 'bitcoin'
          network: 'mainnet'
          private-key: ${{ secrets.BACON_PRIVATE_KEY }}
          reward-amount: 100

Best Practices

Security

  • Always use GitHub Secrets for private keys
  • Use read-only tokens when possible
  • Implement rate limiting
  • Validate inputs and recipients

Budget Management

  • Set maximum reward limits
  • Monitor treasury balance
  • Implement daily/monthly caps
  • Alert on low balance

Smart Targeting

  • Reward based on issue labels
  • Consider PR size and quality
  • Bonus for first-time contributors
  • Scale rewards with project maturity

Monitoring

  • Log all reward transactions
  • Track success/failure rates
  • Monitor blockchain fees
  • Generate periodic reports

Ready to Automate?

Start using GitHub Actions for automated BACON rewards