diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 552f858..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @Lilypad-Tech/lilypad-core-engineering diff --git a/.github/workflows/devnet_deploy.yml b/.github/workflows/devnet_deploy.yml deleted file mode 100644 index 567f057..0000000 --- a/.github/workflows/devnet_deploy.yml +++ /dev/null @@ -1,128 +0,0 @@ -name: Deploy Devnet - -on: workflow_dispatch - -jobs: - solver-build-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - context: app - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: "true" - - - name: Solver build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }} - run: | - docker build \ - -t $ECR_REPOSITORY_SOLVER \ - -f ./docker/solver/Dockerfile \ - --build-arg="expose_via=cloudflare" \ - --build-arg="network=devnet" \ - . - docker tag $ECR_REPOSITORY_SOLVER:latest $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - docker push $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - - - name: Solver deploy to EC2 instance - uses: appleboy/ssh-action@master - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }} - DEVNET_DOPPLER_TOKEN_SOLVER: ${{ secrets.DEVNET_DOPPLER_TOKEN_SOLVER }} - with: - host: ${{ secrets.DEVNET_EC2_HOST_SOLVER }} - username: ${{ secrets.DEVNET_EC2_USERNAME_SOLVER }} - key: ${{ secrets.DEVNET_EC2_PRIVATE_KEY_SOLVER }} - envs: ECR_REGISTRY, ECR_REPOSITORY_SOLVER, DEVNET_DOPPLER_TOKEN_SOLVER - script_stop: true - script: | - docker stop solver || true - docker rm solver || true - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY - docker system prune -af - docker pull $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - docker run \ - -d \ - --restart always \ - --name solver \ - --log-opt max-size=100m \ - -e DOPPLER_TOKEN=$DEVNET_DOPPLER_TOKEN_SOLVER \ - $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - - job-creator-build-deploy: - needs: [solver-build-deploy] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - context: app - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: "true" - - - name: Job creator build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }} - run: | - docker build \ - -t $ECR_REPOSITORY_JOB_CREATOR \ - -f ./docker/job-creator/Dockerfile \ - --build-arg="network=devnet" \ - . - docker tag $ECR_REPOSITORY_JOB_CREATOR:latest $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest - docker push $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest - - - name: Job creator deploy to EC2 instance - uses: appleboy/ssh-action@master - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }} - DEVNET_DOPPLER_TOKEN_JOB_CREATOR: ${{ secrets.DEVNET_DOPPLER_TOKEN_JOB_CREATOR }} - with: - host: ${{ secrets.DEVNET_EC2_HOST_JOB_CREATOR }} - username: ${{ secrets.DEVNET_EC2_USERNAME_JOB_CREATOR }} - key: ${{ secrets.DEVNET_EC2_PRIVATE_KEY_JOB_CREATOR }} - envs: ECR_REGISTRY, ECR_REPOSITORY_JOB_CREATOR, DEVNET_DOPPLER_TOKEN_JOB_CREATOR - script_stop: true - script: | - docker stop job-creator || true - docker rm job-creator || true - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY - docker system prune -af - docker pull $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest - docker run \ - -d \ - --restart always \ - --name job-creator \ - --log-opt max-size=100m \ - -e DOPPLER_TOKEN=$DEVNET_DOPPLER_TOKEN_JOB_CREATOR \ - $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest diff --git a/.github/workflows/devnet_deploy_chain.yml b/.github/workflows/devnet_deploy_chain.yml deleted file mode 100644 index d105271..0000000 --- a/.github/workflows/devnet_deploy_chain.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Deploy Devnet chain - -on: workflow_dispatch - -jobs: - chain-build-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - context: app - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: 'true' - - - name: Chain build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_CHAIN: ${{ secrets.ECR_REPOSITORY_CHAIN }} - CLOUDFLARE_TOKEN_HTTP: ${{ secrets.CLOUDFLARE_TOKEN_HTTP }} - CLOUDFLARE_TOKEN_WS: ${{ secrets.CLOUDFLARE_TOKEN_WS }} - ADMIN_ADDRESS: ${{ secrets.ADMIN_ADDRESS }} - run: | - docker build \ - -t $ECR_REPOSITORY_CHAIN \ - -f ./docker/chain/Dockerfile \ - --build-arg="admin_address=${ADMIN_ADDRESS}" \ - --build-arg="expose_via=cloudflare" \ - --build-arg="cloudflare_token_http=${CLOUDFLARE_TOKEN_HTTP}"\ - --build-arg="cloudflare_token_ws=${CLOUDFLARE_TOKEN_WS}"\ - . - docker tag $ECR_REPOSITORY_CHAIN:latest $ECR_REGISTRY/$ECR_REPOSITORY_CHAIN:latest - docker push $ECR_REGISTRY/$ECR_REPOSITORY_CHAIN:latest - - - name: Chain deploy to EC2 instance - uses: appleboy/ssh-action@master - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_CHAIN: ${{ secrets.ECR_REPOSITORY_CHAIN }} - with: - host: ${{ secrets.DEVNET_EC2_HOST_CHAIN }} - username: ${{ secrets.DEVNET_EC2_USERNAME_CHAIN }} - key: ${{ secrets.DEVNET_EC2_PRIVATE_KEY_CHAIN }} - envs: ECR_REGISTRY, ECR_REPOSITORY_CHAIN - script_stop: true - script: | - docker stop chain || true - docker rm chain || true - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY - docker system prune -af - docker system prune --volumes -f - docker pull $ECR_REGISTRY/$ECR_REPOSITORY_CHAIN:latest - docker run \ - -d \ - --restart always \ - --privileged \ - --name chain \ - $ECR_REGISTRY/$ECR_REPOSITORY_CHAIN:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40d3670..434bb36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,43 +41,6 @@ jobs: sha: ${{ steps.release.outputs.sha }} tag_name: ${{ steps.release.outputs.tag_name }} - merge: - if: needs.release.outputs.prs_created == 'true' && needs.release.outputs.releases_created == 'false' - name: Merge Release PR - needs: release - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: release-please--branches--main - - - name: Get Release Bot Token - id: get-release-bot-token - uses: peter-murray/workflow-application-token-action@v1 - with: - application_id: ${{ secrets.RELEASE_BOT_ID }} - application_private_key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }} - organization: "Lilypad-Tech" - - # Approve with github-actions bot - - name: Approve PR - id: approve - env: - GH_TOKEN: ${{ github.token }} - run: | - gh pr review --approve - - # Auto-merge PR when status checks complete or merge immediately if no checks in progress - # The auto-merge flag requires branch protection rule overrides. - - name: Merge Release PR - env: - GH_TOKEN: ${{ steps.get-release-bot-token.outputs.token }} - run: gh pr merge --squash --auto || gh pr merge --squash - extend-notes: if: needs.release.outputs.releases_created == 'true' && needs.release.outputs.prs_created == 'false' name: Extend Release Notes @@ -132,10 +95,10 @@ jobs: goarch: amd64 gpu: true runner: ubuntu-latest - - goos: linux - goarch: arm64 - gpu: true - runner: linux-arm64 + # - goos: linux + # goarch: arm64 + # gpu: true + # runner: linux-arm64 - goos: darwin goarch: amd64 gpu: false diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml deleted file mode 100644 index 0976b14..0000000 --- a/.github/workflows/release_docker.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish Docker Image - -on: - push: - branches: - - "main" - tags: - - "v*" - -jobs: - docker: - name: Push Docker image - runs-on: ubuntu-latest - strategy: - matrix: - include: - - image: ghcr.io/Lilypad-Tech/bacalhau - dockerfile: ./docker/bacalhau/Dockerfile - - image: ghcr.io/Lilypad-Tech/job-creator - dockerfile: ./docker/job-creator/Dockerfile - - image: ghcr.io/Lilypad-Tech/resource-provider - dockerfile: ./docker/resource-provider/Dockerfile - - image: ghcr.io/Lilypad-Tech/solver - dockerfile: ./docker/solver/Dockerfile - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Login to the Github Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Docker Metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ matrix.image }} - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - file: ${{ matrix.dockerfile }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/testnet_deploy_contracts.yml b/.github/workflows/testnet_deploy_contracts.yml deleted file mode 100644 index b65d30b..0000000 --- a/.github/workflows/testnet_deploy_contracts.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Deploy Testnet contracts - -on: workflow_dispatch - -jobs: - contracts: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - context: app - - - name: Install Doppler CLI - uses: dopplerhq/cli-action@v1 - - - name: Deploy contracts - id: deploy-contracts - env: - DOPPLER_TOKEN: ${{ secrets.TESTNET_DOPPLER_TOKEN_CONTRACTS_DEPLOY }} - run: | - cd hardhat - npm ci - doppler run -- npx hardhat deploy --network testnet - git commit -m "Contract Migration Updated" - git push diff --git a/.github/workflows/testnet_deploy_services.yml b/.github/workflows/testnet_deploy_services.yml deleted file mode 100644 index b1b2ab0..0000000 --- a/.github/workflows/testnet_deploy_services.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Deploy Testnet services - -on: - push: - tags: - - "v*" - -jobs: - solver-build-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - context: app - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: "true" - - - name: Solver build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }} - run: | - docker build \ - -t $ECR_REPOSITORY_SOLVER \ - -f ./docker/solver/Dockerfile \ - --build-arg="expose_via=cloudflare" \ - --build-arg="network=testnet" \ - . - docker tag $ECR_REPOSITORY_SOLVER:latest $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - docker push $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - - - name: Solver deploy to EC2 instance - uses: appleboy/ssh-action@master - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }} - TESTNET_DOPPLER_TOKEN_SOLVER: ${{ secrets.TESTNET_DOPPLER_TOKEN_SOLVER }} - with: - host: ${{ secrets.TESTNET_EC2_HOST_SOLVER }} - username: ${{ secrets.TESTNET_EC2_USERNAME_SOLVER }} - key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_SOLVER }} - envs: ECR_REGISTRY, ECR_REPOSITORY_SOLVER, TESTNET_DOPPLER_TOKEN_SOLVER - script_stop: true - script: | - docker stop solver || true - docker rm solver || true - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY - docker system prune -af - docker pull $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - docker run \ - -d \ - --restart always \ - --name solver \ - --log-opt max-size=100m \ - -e DOPPLER_TOKEN=$TESTNET_DOPPLER_TOKEN_SOLVER \ - $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest - - job-creator-build-deploy: - needs: [solver-build-deploy] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - context: app - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: "true" - - - name: Job creator build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }} - run: | - docker build \ - -t $ECR_REPOSITORY_JOB_CREATOR \ - -f ./docker/job-creator/Dockerfile \ - --build-arg="network=testnet" \ - . - docker tag $ECR_REPOSITORY_JOB_CREATOR:latest $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest - docker push $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest - - - name: Job creator deploy to EC2 instance - uses: appleboy/ssh-action@master - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }} - TESTNET_DOPPLER_TOKEN_JOB_CREATOR: ${{ secrets.TESTNET_DOPPLER_TOKEN_JOB_CREATOR }} - with: - host: ${{ secrets.TESTNET_EC2_HOST_JOB_CREATOR }} - username: ${{ secrets.TESTNET_EC2_USERNAME_JOB_CREATOR }} - key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_JOB_CREATOR }} - envs: ECR_REGISTRY, ECR_REPOSITORY_JOB_CREATOR, TESTNET_DOPPLER_TOKEN_JOB_CREATOR - script_stop: true - script: | - docker stop job-creator || true - docker rm job-creator || true - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY - docker system prune -af - docker pull $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest - docker run \ - -d \ - --restart always \ - --name job-creator \ - --log-opt max-size=100m \ - -e DOPPLER_TOKEN=$TESTNET_DOPPLER_TOKEN_JOB_CREATOR \ - $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest diff --git a/.github/workflows/testnet_restart_job_creator.yml b/.github/workflows/testnet_restart_job_creator.yml deleted file mode 100644 index c6151ac..0000000 --- a/.github/workflows/testnet_restart_job_creator.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Restart Testnet job creator - -on: workflow_dispatch - -jobs: - job-creator-restart: - runs-on: ubuntu-latest - steps: - - name: Restart job-creator container - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.TESTNET_EC2_HOST_JOB_CREATOR }} - username: ${{ secrets.TESTNET_EC2_USERNAME_JOB_CREATOR }} - key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_JOB_CREATOR }} - script_stop: true - script: | - docker restart job-creator || true diff --git a/.github/workflows/testnet_restart_solver.yml b/.github/workflows/testnet_restart_solver.yml deleted file mode 100644 index 019426d..0000000 --- a/.github/workflows/testnet_restart_solver.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Restart Testnet solver - -on: workflow_dispatch - -jobs: - solver-restart: - runs-on: ubuntu-latest - steps: - - name: Restart solver container - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.TESTNET_EC2_HOST_SOLVER }} - username: ${{ secrets.TESTNET_EC2_USERNAME_SOLVER }} - key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_SOLVER }} - script_stop: true - script: | - docker restart solver || true