-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test PR opening on kakarot * fix staging * delete token * fix * fix staging * fix * uncomment
- Loading branch information
Showing
1 changed file
with
10 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,13 @@ on: workflow_dispatch | |
jobs: | ||
stage: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: install foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
|
@@ -63,24 +65,19 @@ jobs: | |
has_diff=$? | ||
set -e | ||
echo "has_diff=$has_diff" >> $GITHUB_ENV | ||
- name: Create and push branch for deployment updates | ||
- name: Create PR for deployment updates | ||
if: ${{ env.has_diff == 1 }} | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
set +e | ||
cd lib/kakarot | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git checkout -b update-staging-deployment-${{ github.run_id }} | ||
git checkout -b update-staging-deployment-run-${{ github.run_id }} | ||
git add deployments/kakarot-staging/ | ||
git commit -m "Update staging deployments from run ${{ github.run_id }}" | ||
git push --set-upstream origin update-staging-deployment-${{ github.run_id }} | ||
- name: Open PR on Kakarot | ||
if: ${{ env.has_diff == 1 }} | ||
run: | | ||
set +e | ||
curl -X POST \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-H "Accept: application/vnd.github+json" \ | ||
https://api.github.com/repos/kkrt-labs/kakarot/pulls \ | ||
-d '{"title":"Update staging deployments from run ${{ github.run_id }}","head":"update-staging-deployment-${{ github.run_id }}","base":"main","body":"This PR updates the staging deployments for staging run ${{ github.run_id }}."}' | ||
git push --set-upstream origin update-staging-deployment-run-${{ github.run_id }} --force | ||
gh pr create --repo=kkrt-labs/kakarot --base=main --head=update-staging-deployment-run-${{ github.run_id }} \ | ||
--title "Update staging deployments from staging run ${{ github.run_id }}" \ | ||
--body "This PR updates the staging deployments for staging run ${{ github.run_id }}." |