Add workflow to PR kakarot RPC on release #31
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: read-all | |
jobs: | |
update-submodule: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout Kakarot-RPC Repository | |
uses: actions/checkout@v4 | |
with: | |
repository: kkrt-labs/kakarot-rpc | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: kakarot-rpc | |
- name: Update Submodule | |
env: | |
# GH_TOKEN is a secret defined in the github repository settings and not the default GITHUB_TOKEN | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
echo "${{ secrets.GH_TOKEN }}" | |
echo "${{ secrets.DEVNET_ACCOUNT_ADDRESS }}" | |
ls -la | |
cd kakarot-rpc | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
git remote show origin | |
git status | |
git fetch --tags | |
git submodule update --recursive --init | |
cd lib/kakarot | |
ls -la | |
echo "Current directory: $(pwd)" | |
git remote show origin | |
git status | |
git fetch --tags | |
export release_tag=$(git tag --sort=-creatordate | head -n 1) | |
git checkout $release_tag | |
cd ../.. | |
git checkout -b kakarot-$release_tag | |
git add lib/kakarot | |
git commit -m "Update kakarot to $release_tag" | |
gh pr create -B main -H kakarot-$release_tag --title 'Update Kakarot to $release_tag' --body 'Update Kakarot to $release_tag' |