Skip to content

Commit

Permalink
fix: fix jira step move issue workflow (#94)
Browse files Browse the repository at this point in the history
* cI: fix jira step move issue workflow

* fix: fix shell script

* fix: fix shell script

* fix: fix shell script

* fix: return to bash

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* fix: add go jira cli

* refactor: rename step names
  • Loading branch information
dennis-avesani-zupit authored Apr 8, 2024
1 parent 359853d commit ec0a0ef
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/jira-step-move-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
image: ${{ inputs.DIND_IMAGE }}

steps:
- name: Setup
uses: atlassian/gajira-cli@v3
with:
version: 1.0.27

- name: Login to Jira
uses: atlassian/gajira-login@master
env:
Expand All @@ -50,6 +45,14 @@ jobs:
string: ${{ inputs.BRANCH_OR_COMMIT_TITLE }}
continue-on-error: true

- name: Install bash
run: (cd /tmp && apk update && apk add bash curl)

- name: Download jira binary
run: |
curl -L -o /tmp/jira https://github.com/go-jira/jira/releases/download/v1.0.27/jira-linux-386
chmod +x /tmp/jira
- name: Check issue status
id: check-status
shell: 'bash'
Expand All @@ -58,7 +61,7 @@ jobs:
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
run: |
verified_states=("verified" "non compliant" "done" "billed" "to be billed")
output=$(jira view ${{ steps.find.outputs.issue }} --field status -e ${{ secrets.JIRA_BASE_URL }} --login ${{ secrets.JIRA_USER_EMAIL }} | sed -n 's/status: \(.*\)/\L\1/p')
output=$(/tmp/jira view ${{ steps.find.outputs.issue }} --field status -e ${{ secrets.JIRA_BASE_URL }} --login ${{ secrets.JIRA_USER_EMAIL }} | sed -n 's/status: \(.*\)/\L\1/p')
[[ ${verified_states[*]} =~ ${output} ]] && is_verified=true || is_verified=false
echo "verified=$is_verified" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit ec0a0ef

Please sign in to comment.