Skip to content

Commit

Permalink
feat: Monorepo Pin Update (#604)
Browse files Browse the repository at this point in the history
* feat: monorepo pin update

* fix: update action tests workflow

* fix: hoist just install
  • Loading branch information
refcell authored Oct 2, 2024
1 parent 896339d commit 6917a5f
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/action_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/monorepo_pin_update.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .monorepo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d05fb505809717282d5cee7264a09d26002a4ddd
9 changes: 9 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6917a5f

Please sign in to comment.