Skip to content

Commit 677042f

Browse files
committed
Add CI
1 parent a79914a commit 677042f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/sdk_ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,28 @@ jobs:
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v3
23+
24+
- name: Step for pull_request event
25+
run: |
26+
echo "This is a pull_request event!"
27+
git log -n 5 --format="%H %an %s" | while read line; do echo "$line"; done
28+
echo "The latest commitId $(git log -n 2 --format='%H' | tail -n 1)"
29+
echo "COMMIT_ID=$(git log -n 2 --format='%H' | tail -n 1)" >> $GITHUB_ENV
30+
if: github.event_name == 'pull_request'
31+
32+
- name: Create Github URL
33+
run: |
34+
API_HOST=https://api.github.com
35+
echo "The latest commitId is $COMMIT_ID"
36+
GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
37+
echo "GITHUB_URL: $GITHUB_URL"
38+
echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
2339
2440
- name: Set up Python environment
2541
run: |
2642
python -m venv venv
2743
source venv/bin/activate
44+
2845

2946
- name: Install NPM Dependencies
3047
run: |

0 commit comments

Comments
 (0)