File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff 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 : |
You can’t perform that action at this time.
0 commit comments