From f30291ce03cf22a374228c3ea0fa2af1a4251e9e Mon Sep 17 00:00:00 2001 From: jamshale Date: Tue, 23 Apr 2024 11:15:22 -0700 Subject: [PATCH 1/2] WIP - Creating PR Signed-off-by: jamshale --- .github/workflows/create-release-pr.yaml | 30 +++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index 85f1e2cf7..072d73f3e 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -214,9 +214,10 @@ jobs: cd ../.. done echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT - - name: Create Pull Request - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # ---------------------------------------------- + # Prepare Pull Request + # ---------------------------------------------- + - name: Prepare Pull Request run: | echo "Merging failed plugins" failed_plugins=() @@ -314,8 +315,8 @@ jobs: exit 1 fi - git commit -s -m "Release v$release_version Upgrades" - git push --set-upstream origin "release-v$release_version" + # git commit -s -m "Release v$release_version Upgrades" + # git push --set-upstream origin "release-v$release_version" # Create the PR @@ -325,4 +326,21 @@ jobs: done title="Release for aries-cloudagent v$release_version" - gh pr create --title "$title" --body "$body $details" --base main --head "release-v$release_version" + # gh pr create --title "$title" --body "$body $details" --base main --head "release-v$release_version" + #---------------------------------------------- + # Create Release PR + #---------------------------------------------- + - name: Create PR + uses: peter-evans/create-pull-request@v6 + with: + author: Release Bot + committer: Release Bot + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Release v${{ steps.current_available_version.outputs.current_available_version }}" + title: "Release v${{ steps.current_available_version.outputs.current_available_version }}" + body: "Release v${{ steps.current_available_version.outputs.current_available_version }}" + branch: "release-v${{ steps.current_available_version.outputs.current_available_version }}" + base: "jamshale/aries-acapy-plugins:main" + draft: false + signoff: true + delete-branch: true From 46775d2a4c75a596dd50678d25f467d1fd7b32e5 Mon Sep 17 00:00:00 2001 From: jamshale Date: Tue, 23 Apr 2024 12:54:53 -0700 Subject: [PATCH 2/2] WIP - Creating PR Signed-off-by: jamshale --- .github/workflows/create-release-pr.yaml | 68 ++++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index 072d73f3e..d2834c3a4 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -183,37 +183,37 @@ jobs: cd .. done echo unit_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT - # ---------------------------------------------- - # Install docker compose - # ---------------------------------------------- - - name: Initialize Docker Compose - uses: isbang/compose-action@v1.5.1 - # ---------------------------------------------- - # Collect plugins that fail integration tests - # ---------------------------------------------- - - name: Integration Test Plugins - id: integration_test_plugins - continue-on-error: true - run: | - trap 'echo "integration_test_exit_code=$?" >> "$GITHUB_OUTPUT"' EXIT - declare -a failed_plugins=() - for dir in ./*/; do - current_folder=$(basename "$dir") - if [[ $current_folder == "plugin_globals" ]]; then - continue - fi - cd $current_folder/integration - docker compose down --remove-orphans - docker compose build - if docker compose run tests; then - echo "plugin $current_folder passed integration test check" - else - echo "plugin $current_folder failed integration test check" - failed_plugins+=("$current_folder") - fi - cd ../.. - done - echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT + # # ---------------------------------------------- + # # Install docker compose + # # ---------------------------------------------- + # - name: Initialize Docker Compose + # uses: isbang/compose-action@v1.5.1 + # # ---------------------------------------------- + # # Collect plugins that fail integration tests + # # ---------------------------------------------- + # - name: Integration Test Plugins + # id: integration_test_plugins + # continue-on-error: true + # run: | + # trap 'echo "integration_test_exit_code=$?" >> "$GITHUB_OUTPUT"' EXIT + # declare -a failed_plugins=() + # for dir in ./*/; do + # current_folder=$(basename "$dir") + # if [[ $current_folder == "plugin_globals" ]]; then + # continue + # fi + # cd $current_folder/integration + # docker compose down --remove-orphans + # docker compose build + # if docker compose run tests; then + # echo "plugin $current_folder passed integration test check" + # else + # echo "plugin $current_folder failed integration test check" + # failed_plugins+=("$current_folder") + # fi + # cd ../.. + # done + # echo integration_test_plugins=${failed_plugins[*]} >> $GITHUB_OUTPUT # ---------------------------------------------- # Prepare Pull Request # ---------------------------------------------- @@ -268,7 +268,7 @@ jobs: git config --global user.name 'Release Bot' git config --global user.email 'release-bot@users.noreply.github.com' - git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/hyperledger/aries-acapy-plugins + # git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/hyperledger/aries-acapy-plugins git fetch --all git checkout -b "release-v$release_version" @@ -315,7 +315,7 @@ jobs: exit 1 fi - # git commit -s -m "Release v$release_version Upgrades" + git commit -s -m "Release v$release_version Upgrades" # git push --set-upstream origin "release-v$release_version" # Create the PR @@ -335,7 +335,7 @@ jobs: with: author: Release Bot committer: Release Bot - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.BOT_PR_PAT }} commit-message: "Release v${{ steps.current_available_version.outputs.current_available_version }}" title: "Release v${{ steps.current_available_version.outputs.current_available_version }}" body: "Release v${{ steps.current_available_version.outputs.current_available_version }}"