Skip to content

Commit 4fefcee

Browse files
committed
comment
1 parent 10a0dae commit 4fefcee

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ jobs:
6969
curl --fail-with-body --no-progress-meter -i https://0d9e.tech/deploy -X POST \
7070
-H "x-token: ${{ github.ref == 'refs/heads/amogus' && secrets.STAGING_TOKEN || secrets.DEPLOY_TOKEN }}"
7171
72+
- name: Comment
73+
if: ${{ github.ref == 'refs/heads/amogus' && steps.lint.outcome == 'success' }}
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
run: |
77+
num=$(gh pr list -B sus -H amogus --json number | jq .[0].number -r)
78+
if [ "$num" = "null" ]; then
79+
gh pr create --base sus --head amogus --title "Release to sus" --body ""
80+
num=$(gh pr list -B sus -H amogus --json number | jq .[0].number -r)
81+
fi
82+
gh pr comment $num --body "@${{ github.actor }} Your changes were deployed to staging, you can merge them here."
83+
7284
# else: revert the commit(s)
7385
- name: Revert commit(s)
7486
if: ${{ steps.lint.outcome != 'success' }}

0 commit comments

Comments
 (0)