Skip to content

Commit 9f35420

Browse files
Merge pull request #122 from inbo/update-GHA
Update gha that publishes website
2 parents 5128e92 + 77a7f03 commit 9f35420

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/update_website.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22

33
on:
44
push:
@@ -10,9 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111
name: "add protocol to website"
1212
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
1621
- name: test
1722
run: echo 'branch name =' $RECENT_MERGED_BRANCH_NAME
1823
- name: Checkout repo and build website

0 commit comments

Comments
 (0)