Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: automated EELS bumps #225

Merged
merged 10 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 94 additions & 18 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,31 @@ on:
workflow_dispatch:
# Needed so we can run it manually

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: cargo-update
TITLE: "chore(deps): weekly `cargo update`"
BODY: |
Automation to keep dependencies in `Cargo.lock` current.

<details><summary><strong>cargo update log</strong></summary>
<p>

```log
$cargo_update_log
```

</p>
</details>

permissions:
checks: write
contents: write
pull-requests: write

jobs:
update:
update-rust-deps:
name: Update
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: cargo-update
TITLE: "chore(deps): weekly `cargo update`"
BODY: |
Automation to keep dependencies in `Cargo.lock` current.

<details><summary><strong>cargo update log</strong></summary>
<p>

```log
$cargo_update_log
```

</p>
</details>
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
Expand Down Expand Up @@ -73,3 +72,80 @@ jobs:
title: ${{ env.TITLE }}
body: ${{ steps.msg.outputs.body }}
branch: ${{ env.BRANCH }}
delete-branch: true

update-python-deps:
name: Update
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: uv-update
TITLE: "chore(deps): update ethereum execution-specs"
BODY: |
Automation to keep ethereum execution-specs dependency up to date.

<details><summary><strong>uv update log</strong></summary>
<p>

```log
$uv_update_log
```

</p>
</details>
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: uv.lock

- name: Update ethereum execution-specs
id: update
run: |
LATEST_COMMIT=$(curl -s "https://api.github.com/repos/ethereum/execution-specs/commits/master" | jq -r .sha)
uv add ethereum@git+https://github.com/ethereum/execution-specs.git --rev $LATEST_COMMIT > uv_update.log 2>&1
cat uv_update.log

- name: Craft commit message and PR body
id: msg
run: |
export uv_update_log="$(cat uv_update.log)"

echo "commit_message<<EOF" >> $GITHUB_OUTPUT
printf "chore(deps): update ethereum execution-specs\n\n$uv_update_log\n" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo "body<<EOF" >> $GITHUB_OUTPUT
echo "Automation to keep ethereum execution-specs dependency current.

<details><summary><strong>uv update log</strong></summary>
<p>

\`\`\`log
$uv_update_log
\`\`\`

</p>
</details>" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- uses: actions/create-github-app-token@v1
id: github_token
with:
app-id: ${{ secrets.KAKAROT_BOT_APP_ID }}
private-key: ${{ secrets.KAKAROT_BOT_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.github_token.outputs.token }}
add-paths: ./uv.lock
commit-message: ${{ steps.msg.outputs.commit_message }}
title: ${{ env.TITLE }}
body: ${{ steps.msg.outputs.body }}
branch: "${{ env.BRANCH }}"
labels: dependencies
delete-branch: true
Loading
Loading