File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- name : On merge of "Log RECENT_MERGED_BRANCH_NAME" to main, build the protocol and add it to the website
1
+ name : On merge of protocol branch to main, build the protocol and add it to the website
2
2
3
3
on :
4
4
push :
10
10
runs-on : ubuntu-latest
11
11
name : " add protocol to website"
12
12
steps :
13
- - name : lookup branch name
14
- uses : actions/checkout@v2
15
- - uses : tonynguyenit18/github-action-custom-vars@v1
13
+ - name : checkout the repository
14
+ uses : actions/checkout@v4
15
+ with :
16
+ fetch-depth : 2
17
+ - name : Get branch name of latest merged PR targeting main
18
+ run : |
19
+ RECENT_MERGED_BRANCH_NAME=$(git log --merges origin/main --oneline --grep='^Merge' -1 | grep -oe 'inbo/.*$' | awk -F '/' '{print $2}')
20
+ echo "RECENT_MERGED_BRANCH_NAME=$RECENT_MERGED_BRANCH_NAME" >> $GITHUB_ENV
16
21
- name : test
17
22
run : echo 'branch name =' $RECENT_MERGED_BRANCH_NAME
18
23
- name : Checkout repo and build website
You can’t perform that action at this time.
0 commit comments