From 448b0467df66ef2e7f4450a3fcc83fbc8ba8690a Mon Sep 17 00:00:00 2001 From: He Qian Wang Date: Tue, 5 Mar 2024 15:30:08 -0500 Subject: [PATCH 1/3] [IDP-912] Use reusable Jira workflow --- .github/workflows/jira.yml | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index f2f91888..ba18e365 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -6,29 +6,8 @@ on: paths-ignore: ["*.md"] jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Check Jira Story - shell: pwsh - run: | - Install-Module JiraPS -Scope CurrentUser -Force - if ("$env:GITHUB_HEAD_REF" -like "*renovate/*" -eq $True) - { - Write-Host "Skipping, renovate branch detected" - return - } - - Set-JiraConfigServer -Server "${{ secrets.JIRA_URL }}" - if("$env:GITHUB_HEAD_REF" -match "IDP-[0-9]+" -eq $False) - { - throw "Branch name $env:GITHUB_HEAD_REF doesn't respect the required pattern." - } - - $JiraIssueKey = $Matches[0] - $PWord = ConvertTo-SecureString -String "${{ secrets.JIRA_API_TOKEN }}" -AsPlainText -Force - $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "${{ secrets.JIRA_USERNAME }}", $PWord - - Write-Host "Retrieving Jira issue with number $JiraIssueKey" - Get-JiraIssue -Key $JiraIssueKey -Credential $Credential -ErrorAction Stop | out-null - Write-Host "Successfully retrieved Jira issue" + call-workflow-jira: + uses: gsoft-inc/wl-renovate-workflow/.github/workflows/reusable-jira-workflow.yml@main + with: + branch_name: '$'{{ github.head_ref }} + secrets: inherit From 293bcddc6fe96956a8bf0d0171ca06a8f935d84f Mon Sep 17 00:00:00 2001 From: He Qian Wang Date: Tue, 5 Mar 2024 15:34:50 -0500 Subject: [PATCH 2/3] [IDP-912] Use reusable Jira workflow --- .github/workflows/jira.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index ba18e365..76b39cfb 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -9,5 +9,5 @@ jobs: call-workflow-jira: uses: gsoft-inc/wl-renovate-workflow/.github/workflows/reusable-jira-workflow.yml@main with: - branch_name: '$'{{ github.head_ref }} + branch_name: ${{ github.head_ref }} secrets: inherit From e71999be6d4ae2a8545f8613a745684b821dbe9d Mon Sep 17 00:00:00 2001 From: He Qian Wang Date: Tue, 5 Mar 2024 15:46:08 -0500 Subject: [PATCH 3/3] [IDP-912] Use reusable Jira workflow --- .github/workflows/jira.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index 76b39cfb..f859b63d 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -7,7 +7,7 @@ on: jobs: call-workflow-jira: - uses: gsoft-inc/wl-renovate-workflow/.github/workflows/reusable-jira-workflow.yml@main + uses: gsoft-inc/wl-reusable-workflows/.github/workflows/reusable-jira-workflow.yml@main with: branch_name: ${{ github.head_ref }} secrets: inherit