This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
Add workflow to PR kakarot RPC on release #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Submodule | |
# on: | |
# release: | |
# types: [published] | |
on: [pull_request] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
update-submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Release Tag | |
id: get_release_tag | |
# run: echo "release_tag=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | |
run: | | |
git fetch --tags | |
echo "release_tag=$(git tag --sort=-creatordate | head -n 1)" >> $GITHUB_ENV | |
- name: Checkout Kakarot-RPC Repository | |
uses: actions/checkout@v4 | |
with: | |
repository: kkrt-labs/kakarot-rpc | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update Submodule | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
cd lib/kakarot | |
echo "Current directory: $(pwd)" | |
git fetch --tags | |
git checkout $(git tag --sort=-creatordate | head -n 1) | |
cd ../.. | |
git checkout -b kakarot-${{ env.release_tag }} | |
git add lib/kakarot | |
git commit -m "Update kakarot to ${{ env.release_tag }}" | |
gh pr create -B main -H kakarot-${{ env.release_tag }} --title 'Update Kakarot to ${{ env.release_tag }}' | |
cd - |