Skip to content

Commit

Permalink
Merge pull request #6 from flashbots/feature/suave-sync
Browse files Browse the repository at this point in the history
Add github workflow to sync Suave library
  • Loading branch information
ferranbt authored Jan 4, 2024
2 parents c7816e2 + 40e56ec commit d41c668
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/suave-lib-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: SuaveLib sync

on: [repository_dispatch, workflow_dispatch]

permissions:
pull-requests: write
issues: write
repository-projects: write
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: flashbots/suave-geth
path: suave-geth
persist-credentials: false
fetch-depth: 0

- name: Get Commit ID
id: get_commit_id
run: |
cd suave-geth
commit_id=$(git rev-parse HEAD)
echo "commit_ref=https://github.com/flashbots/suave-geth/commit/$commit_id" >> $GITHUB_OUTPUT
- name: Mirror
run: |
cp suave-geth/suave/sol/libraries/Suave.sol ./src/suavelib/Suave.sol
cp suave-geth/suave/sol/libraries/SuaveForge.sol ./src/suavelib/SuaveForge.sol
git add ./src/suavelib/Suave.sol
git add ./src/suavelib/SuaveForge.sol
rm -rf suave-geth
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "Update Suave library"
delete-branch: true
commit-message: Update Suave.sol library to ${{ steps.get_commit_id.outputs.commit_ref }}
branch: bot/suave-lib-update
labels: |
suave-lib-update
automated pr
body: |
Update Suave.sol library to ${{ steps.get_commit_id.outputs.commit_ref }}

0 comments on commit d41c668

Please sign in to comment.