From cd0fb983f96a356c31e7b4ae634ff8c823a94c20 Mon Sep 17 00:00:00 2001 From: kadraman Date: Tue, 28 Nov 2023 16:13:24 +0000 Subject: [PATCH] GitHub Actions --- .../fortify-app-and-release-name/action.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/actions/fortify-app-and-release-name/action.yml b/.github/actions/fortify-app-and-release-name/action.yml index 74631a8..418c322 100644 --- a/.github/actions/fortify-app-and-release-name/action.yml +++ b/.github/actions/fortify-app-and-release-name/action.yml @@ -41,10 +41,21 @@ runs: - name: Git branch name id: git-branch-name uses: EthanSK/git-branch-name-action@v1 + - name: Check if PR + id: PR + uses: 8BitJonny/gh-get-current-pr@2.2.0 - name: Set Fortify Release Name id: fortify-release-name shell: bash run: | - echo "Git branch name: ${GIT_BRANCH_NAME}" - echo "::debug::release_name=${GIT_BRANCH_NAME}" - echo "release_name=${GIT_BRANCH_NAME}" >> $GITHUB_OUTPUT + if [[ $IS_PR == true ]]; then + echo "::debug::release_name=${GIT_BRANCH_NAME}#PR_NUMBER" + echo "release_name=${GIT_BRANCH_NAME}#PR_NUMBER" >> $GITHUB_OUTPUT + else + echo "::debug::release_name=${GIT_BRANCH_NAME}" + echo "release_name=${GIT_BRANCH_NAME}" >> $GITHUB_OUTPUT + fi + env: + IS_PR: ${{ steps.PR.outputs.pr_found }} + PR_NUMBER: ${{ steps.PR.outputs.number }} + PR_RELEASE_NAME: ${{ format