From 57945930e587c174a0f7a6a0c1152a8a9a489138 Mon Sep 17 00:00:00 2001 From: ElsLommelen Date: Fri, 21 Jun 2024 14:26:05 +0200 Subject: [PATCH 1/3] replace old external action with own code to retrieve branch name --- .github/workflows/update_website.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_website.yml b/.github/workflows/update_website.yml index d7a1fb08..4fe2dc5f 100644 --- a/.github/workflows/update_website.yml +++ b/.github/workflows/update_website.yml @@ -11,8 +11,13 @@ jobs: name: "add protocol to website" steps: - name: lookup branch name - uses: actions/checkout@v2 - - uses: tonynguyenit18/github-action-custom-vars@v1 + uses: actions/checkout@v4 + with: + fetch-dept: 2 + - name: Get branch name of latest merged PR targeting main + run: | + RECENT_MERGED_BRANCH_NAME=$(git log --merges origin/main --oneline --grep='^Merge' -1 | grep -oe 'inbo/.*$' | awk -F '/' '{print $2}') + echo "RECENT_MERGED_BRANCH_NAME=$RECENT_MERGED_BRANCH_NAME" >> $GITHUB_ENV - name: test run: echo 'branch name =' $RECENT_MERGED_BRANCH_NAME - name: Checkout repo and build website From e8e8b932c6cff24a7ce66f89d6e2308fced5f6bf Mon Sep 17 00:00:00 2001 From: ElsLommelen Date: Fri, 21 Jun 2024 14:26:55 +0200 Subject: [PATCH 2/3] update descriptions --- .github/workflows/update_website.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_website.yml b/.github/workflows/update_website.yml index 4fe2dc5f..821dcc56 100644 --- a/.github/workflows/update_website.yml +++ b/.github/workflows/update_website.yml @@ -1,4 +1,4 @@ -name: On merge of "Log RECENT_MERGED_BRANCH_NAME" to main, build the protocol and add it to the website +name: On merge of protocol branch to main, build the protocol and add it to the website on: push: @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest name: "add protocol to website" steps: - - name: lookup branch name + - name: checkout the repository uses: actions/checkout@v4 with: fetch-dept: 2 From 77a7f03d4a90a70259e2510de2794671a36f695f Mon Sep 17 00:00:00 2001 From: ElsLommelen Date: Fri, 21 Jun 2024 16:21:00 +0200 Subject: [PATCH 3/3] fix typo --- .github/workflows/update_website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_website.yml b/.github/workflows/update_website.yml index 821dcc56..16c5fde5 100644 --- a/.github/workflows/update_website.yml +++ b/.github/workflows/update_website.yml @@ -13,7 +13,7 @@ jobs: - name: checkout the repository uses: actions/checkout@v4 with: - fetch-dept: 2 + fetch-depth: 2 - name: Get branch name of latest merged PR targeting main run: | RECENT_MERGED_BRANCH_NAME=$(git log --merges origin/main --oneline --grep='^Merge' -1 | grep -oe 'inbo/.*$' | awk -F '/' '{print $2}')