File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Execute SmartUI Test with Github App Integration
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ smartui-test :
7
+ runs-on : ubuntu-latest
8
+
9
+ steps :
10
+ - name : Checkout Repository
11
+ uses : actions/checkout@v1
12
+ with :
13
+ fetch-depth : 10
14
+
15
+ - name : Step for push event
16
+ if : github.event_name == 'push'
17
+ run : |
18
+ echo "This is a push event!"
19
+ echo "The latest commitId $(git log -1 --format='%H')"
20
+ echo "COMMIT_ID=$(git log -1 --format='%H')" >> $GITHUB_ENV
21
+
22
+ - name : Step for pull_request event
23
+ if : github.event_name == 'pull_request'
24
+ run : |
25
+ echo "This is a pull_request event!"
26
+ git log -n 5 --format="%H %an %s" | while read line; do echo "$line"; done
27
+ echo "The latest commitId $(git log -n 2 --format='%H' | tail -n 1)"
28
+ echo "COMMIT_ID=$(git log -n 2 --format='%H' | tail -n 1)" >> $GITHUB_ENV
29
+
30
+ - name : Create Github URL
31
+ run : |
32
+ API_HOST=https://api.github.com
33
+ echo "The latest commitId is $COMMIT_ID"
34
+ GITHUB_URL=$API_HOST/repos/$GITHUB_REPOSITORY/statuses/$COMMIT_ID
35
+ echo "GITHUB_URL: $GITHUB_URL"
36
+ echo "GITHUB_URL=$GITHUB_URL" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments