fix: chunk EtherFi withdrawal requests at 1,000 eETH (#335) #94
This file contains hidden or 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
| name: AWS — build runner image | |
| # Builds the arm-oeth runner image and pushes to talos ECR. Does NOT | |
| # propose or sign a release manifest — that step is human-initiated via | |
| # `bun run release:propose` in the talos repo so a deliberate human | |
| # approves what deploys. | |
| # | |
| # Triggers on `main`. | |
| # | |
| # The image installs @oplabs/talos-client from the oplabs GitHub Packages | |
| # registry using the TALOS_PACKAGE_TOKEN secret. It must contain a PAT with | |
| # read:packages access to the oplabs package. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| AWS_REGION: us-east-1 | |
| ECR_REGISTRY: 114563866192.dkr.ecr.us-east-1.amazonaws.com | |
| IMAGE_NAME: talos/arm-oeth | |
| AWS_ROLE_ARN: arn:aws:iam::114563866192:role/talos-gha-OriginProtocol-arm-oeth | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1 | |
| with: | |
| role-to-assume: ${{ env.AWS_ROLE_ARN }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Login to ECR | |
| uses: aws-actions/amazon-ecr-login@4625ce35226a7557230889aae2f52eb50ec3dcda # v2.0.1 | |
| - name: Check if image tag already exists (ECR is IMMUTABLE) | |
| id: tag_exists | |
| run: | | |
| set -euo pipefail | |
| if aws ecr describe-images \ | |
| --repository-name "${IMAGE_NAME}" \ | |
| --image-ids imageTag="${{ github.sha }}" \ | |
| >/dev/null 2>&1; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| echo "Tag ${{ github.sha }} already present; skipping build." | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Set up Docker Buildx | |
| if: steps.tag_exists.outputs.exists == 'false' | |
| uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0 | |
| - name: Build and push runner image | |
| if: steps.tag_exists.outputs.exists == 'false' | |
| uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0 | |
| with: | |
| context: . | |
| file: ./dockerfile-actions | |
| push: true | |
| secrets: | | |
| talos_package_token=${{ secrets.TALOS_PACKAGE_TOKEN }} | |
| build-args: | | |
| GIT_COMMIT_SHA=${{ github.sha }} | |
| tags: | | |
| ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
| - name: Print image reference + digest | |
| run: | | |
| set -euo pipefail | |
| DIGEST=$(aws ecr describe-images \ | |
| --repository-name "${IMAGE_NAME}" \ | |
| --image-ids imageTag="${{ github.sha }}" \ | |
| --query 'imageDetails[0].imageDigest' --output text) | |
| IMAGE_REF="${ECR_REGISTRY}/${IMAGE_NAME}@${DIGEST}" | |
| echo "Image: ${ECR_REGISTRY}/${IMAGE_NAME}:${{ github.sha }}" | |
| echo "Digest: ${DIGEST}" | |
| echo | |
| echo "To deploy this image, run locally in the talos repo:" | |
| echo " bun run release:propose \\" | |
| echo " --service talos-prod-arm-oeth \\" | |
| echo " --container runner \\" | |
| echo " --image \"${IMAGE_REF}\" \\" | |
| echo " --version <semver>" |