From d879193abb80120b2b5bd4cb98405b6ff3b11229 Mon Sep 17 00:00:00 2001 From: hakuturu583 Date: Fri, 10 May 2024 14:50:43 +0900 Subject: [PATCH 1/9] add if section in Release action Signed-off-by: hakuturu583 --- .github/workflows/Release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 49ccac2bb0d..60f505e26d4 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -31,6 +31,7 @@ jobs: container: ros:humble steps: - name: Restore branch + if: github.event.pull_request.merged == true uses: levonet/action-restore-branch@master - name: Install bloom From e715581a41012179806943189c47e36914d80ff1 Mon Sep 17 00:00:00 2001 From: hakuturu583 Date: Fri, 10 May 2024 15:01:05 +0900 Subject: [PATCH 2/9] add continue-on-error: true Signed-off-by: hakuturu583 --- .github/workflows/Release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 60f505e26d4..4ce975e7566 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -33,6 +33,7 @@ jobs: - name: Restore branch if: github.event.pull_request.merged == true uses: levonet/action-restore-branch@master + continue-on-error: true - name: Install bloom run: apt update && apt install -y python3-bloom git From 1eb34695ee709c9329ecd0ebea5428459c1f960d Mon Sep 17 00:00:00 2001 From: hakuturu583 Date: Tue, 14 May 2024 10:00:08 +0900 Subject: [PATCH 3/9] change token in post checklist workflow Signed-off-by: hakuturu583 --- .github/workflows/PostCheckList.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PostCheckList.yaml b/.github/workflows/PostCheckList.yaml index 052ce29d8cd..cdd5a0fffe9 100644 --- a/.github/workflows/PostCheckList.yaml +++ b/.github/workflows/PostCheckList.yaml @@ -33,4 +33,4 @@ jobs: - [ ] Labels of this pull request are valid? - [ ] All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line. - [ ] The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line. - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BLOOM_GITHUB_TOKEN }} From f8633375d4b7745214c4bcbc52d72a47138fe23f Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Mon, 9 Sep 2024 17:03:08 +0900 Subject: [PATCH 4/9] add copy branch step Signed-off-by: Masaya Kataoka --- .github/workflows/Release.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 0b9db8031a3..fcf9bfa2019 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -55,6 +55,15 @@ jobs: git config --global credential.helper ${{ secrets.GITHUB_TOKEN }} git config pull.rebase false + - name: Copy branch to upstream + if: github.event.pull_request.head.repo.full_name != github.repository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_BRANCH="pr-${{ github.event.pull_request.number }}" + git fetch origin "pull/${{ github.event.pull_request.number }}/head:$PR_BRANCH" + git push origin "$PR_BRANCH" + - name: Get old version id: old_version run: | From e691a6645c39216f788780fce28fa9ffb0b962a6 Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Mon, 9 Sep 2024 17:12:57 +0900 Subject: [PATCH 5/9] update Release Action Signed-off-by: Masaya Kataoka --- .github/workflows/Release.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index fcf9bfa2019..e8a7c16b2e4 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -60,9 +60,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - PR_BRANCH="pr-${{ github.event.pull_request.number }}" - git fetch origin "pull/${{ github.event.pull_request.number }}/head:$PR_BRANCH" - git push origin "$PR_BRANCH" + git remote add fork ${{ github.event.pull_request.head.repo.full_name }} + git checkout fork ${{ github.event.pull_request.head.ref }} + git push origin ${{ github.event.pull_request.head.ref }} + git checkout origin master - name: Get old version id: old_version From 18d4b637ff58cd076e2bf35d9b7b8bab5afcfde3 Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Tue, 17 Sep 2024 11:47:52 +0900 Subject: [PATCH 6/9] update Release Action Signed-off-by: Masaya Kataoka --- .github/workflows/Release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index e8a7c16b2e4..d40614c02e2 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -60,7 +60,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git remote add fork ${{ github.event.pull_request.head.repo.full_name }} + git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git git checkout fork ${{ github.event.pull_request.head.ref }} git push origin ${{ github.event.pull_request.head.ref }} git checkout origin master From 1d471a2748e2084a3a009b92bc6d372842e00a34 Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Thu, 19 Sep 2024 16:42:23 +0900 Subject: [PATCH 7/9] update Release Action Signed-off-by: Masaya Kataoka --- .github/workflows/Release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index d40614c02e2..3ff0f1540f4 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -61,7 +61,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git - git checkout fork ${{ github.event.pull_request.head.ref }} + git checkout fork/${{ github.event.pull_request.head.ref }} + git checkout -b ${{ github.event.pull_request.head.ref }} git push origin ${{ github.event.pull_request.head.ref }} git checkout origin master From 5b7f905209a47b98a3fdcba26b05fb9afed9e8c6 Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Thu, 19 Sep 2024 17:19:54 +0900 Subject: [PATCH 8/9] add git fetch Signed-off-by: Masaya Kataoka --- .github/workflows/Release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 3ff0f1540f4..4be7b070c3d 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -61,6 +61,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git + git fetch --all git checkout fork/${{ github.event.pull_request.head.ref }} git checkout -b ${{ github.event.pull_request.head.ref }} git push origin ${{ github.event.pull_request.head.ref }} From acc59270a529090d3c3fd3034062c14016804b92 Mon Sep 17 00:00:00 2001 From: Masaya Kataoka Date: Thu, 19 Sep 2024 17:46:00 +0900 Subject: [PATCH 9/9] update token Signed-off-by: Masaya Kataoka --- .github/workflows/Release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 4be7b070c3d..8e9d658eb58 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -52,13 +52,13 @@ jobs: git config --global user.name "Release Bot" git config --global user.email "action@github.com" git config --global --add safe.directory /__w/scenario_simulator_v2/scenario_simulator_v2 - git config --global credential.helper ${{ secrets.GITHUB_TOKEN }} + git config --global credential.helper ${{ secrets.BLOOM_GITHUB_TOKEN }} git config pull.rebase false - name: Copy branch to upstream if: github.event.pull_request.head.repo.full_name != github.repository env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BLOOM_GITHUB_TOKEN }} run: | git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git git fetch --all