Skip to content

Commit

Permalink
Add OP plugin diff branch workflow (#7486)
Browse files Browse the repository at this point in the history
Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
  • Loading branch information
2 people authored and rjnrohit committed Oct 10, 2024
1 parent 82755ce commit e4b4b6a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/update-no-op-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update OP Plugin diff branch

on:
release:
types: [published]
workflow_dispatch:
inputs:
ref:
description: Branch or tag
required: true
default: master

jobs:
op-plugin-diff:
name: Update OP plugin diff branch
runs-on: ubuntu-latest
steps:
- name: Create GitHub app token
id: gh-app
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.ref }}
token: ${{ steps.gh-app.outputs.token }}
- name: Check out no-op-plugin branch
run: git checkout -b no-op-plugin
- name: Remove Optimism stuff
run: |
rm -rf src/Nethermind/Nethermind.Optimism
rm -rf src/Nethermind/Nethermind.Optimism.Test
sed -i "/Nethermind.Optimism/d" src/Nethermind/Nethermind.sln
sed -i "/Nethermind.Optimism.Test/d" src/Nethermind/Nethermind.sln
- name: Push changes
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add -A
git commit -am "Remove Optimism stuff" || echo "No changes to commit"
git push origin no-op-plugin -f || echo "Nothing to push"

0 comments on commit e4b4b6a

Please sign in to comment.