kleros/kleros-v2

View on GitHub
.github/workflows/deploy-bots.yml

Summary

Maintainability
Test Coverage
on: [workflow_dispatch]

permissions:  # added using https://github.com/step-security/secure-workflows
  contents: read

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423
        with:
          egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

      - uses: actions/checkout@7739b9ba2efcda9dde65ad1e3c2dbe65b41dfba7
      - uses: actions/setup-python@5f2af211d616f86005883b44826180b21abb4060
      - uses: aws-actions/setup-sam@12a6719db503425e98edcc798b6779590a450e8f
      - uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a
        with:
          aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY }}
          aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_KEY }}
          aws-region: us-east-2
      
      # sam build 
      - run: sam build --use-container
        working-directory: bots

      # Run Unit tests- Specify unit tests here 

      # sam deploy
      - run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --stack-name kleros-v2-bots --s3-bucket kleros-v2-bots --capabilities CAPABILITY_IAM --region us-east-2
        working-directory: bots