Update celo-org/op-geth #60
Workflow file for this run
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: "Update celo-org/op-geth" | |
| on: | |
| schedule: | |
| - cron: "00 8 * * Mon" | |
| workflow_dispatch: | |
| jobs: | |
| update-geth-pr: | |
| # Add "id-token" with the intended permissions. | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: "write" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Login at GCP Artifact Registry | |
| uses: celo-org/reusable-workflows/.github/actions/[email protected] | |
| with: | |
| workload-id-provider: "projects/1094498259535/locations/global/workloadIdentityPools/gh-optimism-ro/providers/github-by-repos" | |
| service-account: "[email protected]" | |
| docker-gcp-registries: us-west1-docker.pkg.dev | |
| access-token-lifetime: "2m" | |
| - name: "Set up Cloud SDK" | |
| uses: "google-github-actions/setup-gcloud@v2" | |
| with: | |
| version: ">= 363.0.0" | |
| - name: Get op-geth base branch | |
| id: get-base-branch | |
| run: | | |
| OP_GETH_BASE_BRANCH=$(curl https://api.github.com/repos/celo-org/op-geth | jq .default_branch -r) | |
| echo "OP_GETH_BASE_BRANCH=$OP_GETH_BASE_BRANCH" >> "$GITHUB_ENV" | |
| - name: Run the update-geth script | |
| id: geth-update-script | |
| run: | | |
| GETH_COMMIT=$(git ls-remote https://github.com/celo-org/op-geth/ "$OP_GETH_BASE_BRANCH" | awk '{print $1}') | |
| if [ -z "$GETH_COMMIT" ]; then | |
| echo "Could not find branch '$OP_GETH_BASE_BRANCH' in 'celo-org/op-geth'" >&2 | |
| exit 1 | |
| fi | |
| echo "GETH_COMMIT=${GETH_COMMIT}" >> "$GITHUB_OUTPUT" | |
| python3 ops/scripts/celo-update-op-geth.py "$OP_GETH_BASE_BRANCH" | |
| - name: Create pull request | |
| uses: peter-evans/create-pull-request@v7 | |
| env: | |
| TITLE: "[Automatic] - Update op-geth dependencies" | |
| MESSAGE: | | |
| Update the go package dependency and the devnet | |
| docker container reference of the `l2` service | |
| to the latest commit (`${{ steps.geth-update-script.outputs.GETH_COMMIT }}`) | |
| in the `${{ env.OP_GETH_BASE_BRANCH }}` ref. | |
| with: | |
| add-paths: | | |
| go.mod | |
| go.sum | |
| commit-message: | | |
| ${{ env.TITLE }} | |
| ${{ env.MESSAGE }} | |
| signoff: false | |
| branch: update/op-geth | |
| base: "${{ env.OP_GETH_BASE_BRANCH }}" | |
| delete-branch: true | |
| title: "${{ env.TITLE }}" | |
| body: "${{ env.MESSAGE }}" | |
| draft: false |