fix(ci): pr creation adjust
This commit is contained in:
parent
91ac977704
commit
8c4aa41240
39
.github/workflows/publish-dist.yml
vendored
39
.github/workflows/publish-dist.yml
vendored
@ -220,24 +220,31 @@ jobs:
|
|||||||
new_hash=$(cat ${{ matrix.app }}-ipfs-hash)
|
new_hash=$(cat ${{ matrix.app }}-ipfs-hash)
|
||||||
new_cid=$(ipfs cid format -v 1 -b base32 $new_hash)
|
new_cid=$(ipfs cid format -v 1 -b base32 $new_hash)
|
||||||
|
|
||||||
cd ipfs-redirect
|
ls -al ipfs-redirect
|
||||||
echo $new_hash > cidv0.txt
|
|
||||||
echo $new_cid > cidv1.txt
|
|
||||||
|
|
||||||
git config --global user.email "vega-ci-bot@vega.xyz"
|
echo $new_hash > ipfs-redirect/cidv0.txt
|
||||||
git config --global user.name "vega-ci-bot"
|
echo $new_cid > ipfs-redirect/cidv1.txt
|
||||||
|
|
||||||
branch_name="update-hash-${{ github.ref }}"
|
(
|
||||||
git checkout -b "$branch_name"
|
cd ipfs-redirect
|
||||||
commit_msg="Automated hash update from ${{ github.ref }}"
|
|
||||||
git add cidv0.txt cidv1.txt
|
git status
|
||||||
git commit -m "$commit_msg"
|
cat .git/config
|
||||||
git push -u origin "$branch_name"
|
git config --global user.email "vega-ci-bot@vega.xyz"
|
||||||
pr_url="$(gh pr create --title "${commit_msg}" --body 'automated pull request to update CIDs')"
|
git config --global user.name "vega-ci-bot"
|
||||||
echo $pr_url
|
|
||||||
# once auto merge get's enabled on documentation repo let's do follow up
|
branch_name="update-hash-${{ github.ref }}"
|
||||||
sleep 5
|
git checkout -b "$branch_name"
|
||||||
gh pr merge "${pr_url}" --delete-branch --squash --admin
|
commit_msg="Automated hash update from ${{ github.ref }}"
|
||||||
|
git add cidv0.txt cidv1.txt
|
||||||
|
git commit -m "$commit_msg"
|
||||||
|
git push -u origin "$branch_name"
|
||||||
|
pr_url="$(gh pr create --title "${commit_msg}" --body 'automated pull request to update CIDs')"
|
||||||
|
echo $pr_url
|
||||||
|
# once auto merge get's enabled on documentation repo let's do follow up
|
||||||
|
sleep 5
|
||||||
|
gh pr merge "${pr_url}" --delete-branch --squash --admin
|
||||||
|
)
|
||||||
|
|
||||||
# # Generate console URL
|
# # Generate console URL
|
||||||
# new_console_url_type=ipfs
|
# new_console_url_type=ipfs
|
||||||
|
Loading…
Reference in New Issue
Block a user