Sync Prover to S3 #12
This file contains 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: Sync Prover to S3 | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
# Allow one concurrent deployment | |
env: | |
S3_BUCKET_NAME: "risc0-prover-us-east-1-041119533185" | |
AWS_REGION: "us-east-1" | |
PROVER_TAG: "v2024-04-03.2" | |
concurrency: | |
group: "sync-prover-to-s3" | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
audience: sts.amazonaws.com | |
aws-region: ${{ env.AWS_REGION }} | |
role-to-assume: arn:aws:iam::041119533185:role/GithubBonsolCI | |
- name: Build Prover Artifact | |
run: | | |
docker build --progress=plain -f .github/docker/Dockerfile.prover -o risc0-groth16-prover . --build-arg PROVER_TAG=${PROVER_TAG} | |
- name: Generate SHA-256 Verification | |
run: "for file in risc0-groth16-prover/${PROVER_TAG}/stark/*; do\n basefile=$(basename \"$file\")\n (cd \"$(dirname \"$file\")\" && sha256sum \"$basefile\" > \"$basefile.sha256\")\n echo -n \"sha256sum \"\n cat \"$file.sha256\"\ndone \n" | |
- name: Sync S3 Bucket | |
run: | | |
aws s3 sync ./risc0-groth16-prover/ s3://${S3_BUCKET_NAME} --no-progress --region ${{ env.AWS_REGION }} |