diff --git a/.github/workflows/action_tests.yaml b/.github/workflows/action_tests.yaml index bba86371..bd07277c 100644 --- a/.github/workflows/action_tests.yaml +++ b/.github/workflows/action_tests.yaml @@ -14,15 +14,10 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v4 + - uses: taiki-e/install-action@just + - uses: dtolnay/rust-toolchain@stable - name: Clone monorepo - run: | - git clone https://github.com/ethereum-optimism/monorepo - # September 30, 2024 - cd monorepo && git checkout d05fb505809717282d5cee7264a09d26002a4ddd - - name: Install just - uses: taiki-e/install-action@just - - name: Install Rust stable toolchain - uses: dtolnay/rust-toolchain@stable + run: just monorepo - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true diff --git a/.github/workflows/monorepo_pin_update.yaml b/.github/workflows/monorepo_pin_update.yaml new file mode 100644 index 00000000..173a6a57 --- /dev/null +++ b/.github/workflows/monorepo_pin_update.yaml @@ -0,0 +1,41 @@ +name: Update the monorepo pin commit + +on: + schedule: + - cron: '30 5 */2 * *' + workflow_dispatch: + +jobs: + monorepo-pin: + name: Update the monorepo pinned commit + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + token: ${{ secrets.PAT_TOKEN }} + - uses: taiki-e/install-action@just + - uses: dtolnay/rust-toolchain@stable + - name: Update Monorepo Commit + run: just update-monorepo + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.PAT_TOKEN }} + commit-message: Update Monorepo Commit + signoff: false + branch: bot/update-monorepo + base: main + delete-branch: true + title: '[BOT] Update Monorepo' + body: | + ### Description + + Automated PR to update the monorepo commit. + labels: | + A-ci + C-bot + assignees: refcell + draft: false diff --git a/.monorepo b/.monorepo new file mode 100644 index 00000000..ffdfde20 --- /dev/null +++ b/.monorepo @@ -0,0 +1 @@ +d05fb505809717282d5cee7264a09d26002a4ddd diff --git a/justfile b/justfile index 0320f8cb..55ba5fda 100644 --- a/justfile +++ b/justfile @@ -164,3 +164,12 @@ build-client-prestate-asterisc kona_tag asterisc_tag out='./prestate-artifacts-a --build-arg ASTERISC_TAG={{asterisc_tag}} \ --platform linux/amd64 \ . +# Clones and checks out the monorepo at the commit present in `.monorepo` +monorepo: + [ ! -d monorepo ] && git clone https://github.com/ethereum-optimism/monorepo + cd monorepo && git checkout $(cat ../.monorepo) + +# Updates the pinned version of the monorepo +update-monorepo: + [ ! -d monorepo ] && git clone https://github.com/ethereum-optimism/monorepo + cd monorepo && git rev-parse HEAD > ../.monorepo