Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci-build

on:
workflow_dispatch:
issue_comment:
types: [created]

jobs:
run:
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
ISSUE_BODY: "${{ github.event.issue.body }}"

steps:
- name: Parse comment
if: github.event.issue.pull_request
uses: khan/[email protected]
id: check
with:
trigger: '[ci-build]'
reaction: rocket

- name: Trigger PR workflows
if: steps.check.outputs.triggered == 'true'
run: |
echo "-----------"
body="$(echo "$ISSUE_BODY" | sed ':a;N;$!ba;s:\r:\\r:g;s:\n:\\n:g;')"
echo "body = $body"
suffix='\n[]()'
if echo "$body" | grep -q '\\n\[\]()$'; then
body="$(echo "$body" | sed 's:\\n\[\]()$::g;')"
suffix=''
fi
echo "-----------"
curl \
-H "Authorization: token ${{ secrets.SOFA_REPO_WRITE_TOKEN }}" \
-X PATCH \
-d "{\"body\":\"$body$suffix\"}" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}
5 changes: 4 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: MacOS CI

on: [workflow_dispatch, pull_request]
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
build:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Ubuntu CI

on: [workflow_dispatch, pull_request]
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
build:
Expand Down