diff --git a/.github/workflows/build-sign-binaries.yaml b/.github/workflows/build-sign-binaries.yaml index e9803181d5..8697115e35 100644 --- a/.github/workflows/build-sign-binaries.yaml +++ b/.github/workflows/build-sign-binaries.yaml @@ -4,25 +4,26 @@ on: push: branches: - master - - 'release/[0-9]+.[0-9]+' + - 'release/[0-9]+.[0-9]+.x' workflow_dispatch: jobs: - Build-Container-Blockchain-Binaries: - uses: celo-org/reusable-workflows/.github/workflows/container-cicd.yaml@v1.8 + build-container-blockchain-binaries: + uses: celo-org/reusable-workflows/.github/workflows/container-cicd.yaml@1e4de01c8a4c8271b1a9599c72894684386d63cd with: workload-id-provider: 'projects/1094498259535/locations/global/workloadIdentityPools/gh-celo-blockchain/providers/github-by-repos' service-account: 'celo-blockchain@devopsre.iam.gserviceaccount.com' artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-blockchain-public/geth-xgo-builder tag: latest + platforms: linux/amd64 context: . file: Dockerfile.binaries trivy: true - Upload-Cloud-Storage: + upload-cloud-storage: runs-on: ubuntu-latest needs: - - Build-Container-Blockchain-Binaries + - build-container-blockchain-binaries permissions: contents: 'read' id-token: 'write' @@ -32,10 +33,10 @@ jobs: BRANCH_NAME: ${{ github.ref_name }} REPO_NAME: ${{ github.repository }} COMMIT_SHA: ${{ github.sha }} - steps: + steps: - name: 'Checkout' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - id: 'auth-gcp-master' name: 'Authenticate to Google Cloud' @@ -58,14 +59,43 @@ jobs: - name: 'Go Run all-tools' run: | - docker run --rm -v $(pwd)/build/bin:/build -v $(pwd)/build/archives:/archives -v $(pwd):/go/src/github.com/celo-org/celo-blockchain --entrypoint /bin/sh --env BUILD_TARGETS=$_BUILD_TARGETS --env TAG_NAME=$TAG_NAME --env BRANCH_NAME=$BRANCH_NAME --env REPO_NAME=$REPO_NAME --env COMMIT_SHA=$COMMIT_SHA --env COMMIT_TIMESTAMP=${{ env.COMMIT_TIMESTAMP }} --env CLOUDBUILD=True --env CI=True us-west1-docker.pkg.dev/devopsre/celo-blockchain-public/geth-xgo-builder:$COMMIT_SHA -c "go run build/ci.go xgo --alltools -- -targets=$BUILD_TARGETS -v -dest /build" + docker run --rm \ + \ + -v $(pwd)/build/bin:/build \ + -v $(pwd)/build/archives:/archives \ + -v $(pwd):/go/src/github.com/celo-org/celo-blockchain \ + --env BUILD_TARGETS=$_BUILD_TARGETS \ + --env TAG_NAME=$TAG_NAME \ + --env BRANCH_NAME=$BRANCH_NAME \ + --env REPO_NAME=$REPO_NAME \ + --env COMMIT_SHA=$COMMIT_SHA \ + --env COMMIT_TIMESTAMP=${{ env.COMMIT_TIMESTAMP }} \ + --env CLOUDBUILD=True \ + --env CI=True \ + --entrypoint /bin/sh \ + us-west1-docker.pkg.dev/devopsre/celo-blockchain-public/geth-xgo-builder:$COMMIT_SHA \ + -c "go run build/ci.go xgo --alltools -- -targets=$BUILD_TARGETS -v -dest /build" - name: 'Go Run xgo-archive' run: | - docker run --rm -v $(pwd)/build/bin:/build -v $(pwd)/build/archives:/archives -v $(pwd):/go/src/github.com/celo-org/celo-blockchain --entrypoint /bin/sh --env BUILD_TARGETS=$_BUILD_TARGETS --env TAG_NAME=$TAG_NAME --env BRANCH_NAME=$BRANCH_NAME --env REPO_NAME=$REPO_NAME --env COMMIT_SHA=$COMMIT_SHA --env COMMIT_TIMESTAMP=${{ env.COMMIT_TIMESTAMP }} --env CLOUDBUILD=True --env CI=True us-west1-docker.pkg.dev/devopsre/celo-blockchain-public/geth-xgo-builder:$COMMIT_SHA -c "go run build/ci.go xgo-archive -targets=$BUILD_TARGETS -in /build -out /archives" + docker run --rm \ + -v $(pwd)/build/bin:/build \ + -v $(pwd)/build/archives:/archives \ + -v $(pwd):/go/src/github.com/celo-org/celo-blockchain \ + --env BUILD_TARGETS=$_BUILD_TARGETS \ + --env TAG_NAME=$TAG_NAME \ + --env BRANCH_NAME=$BRANCH_NAME \ + --env REPO_NAME=$REPO_NAME \ + --env COMMIT_SHA=$COMMIT_SHA \ + --env COMMIT_TIMESTAMP=${{ env.COMMIT_TIMESTAMP }} \ + --env CLOUDBUILD=True \ + --env CI=True \ + --entrypoint /bin/sh \ + us-west1-docker.pkg.dev/devopsre/celo-blockchain-public/geth-xgo-builder:$COMMIT_SHA \ + -c "go run build/ci.go xgo-archive -targets=$BUILD_TARGETS -in /build -out /archives" - name: 'Upload to storage bucket' - uses: 'google-github-actions/upload-cloud-storage@v1' + uses: google-github-actions/upload-cloud-storage@v1 with: path: './build/archives' destination: celo-blockchain-binaries/binaries/${{ env.BRANCH_NAME }}