-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (52 loc) · 1.77 KB
/
jira_issue_manage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
name: Manage JIRA Issue
on:
issues:
types:
- opened
- reopened
- edited
- closed
- deleted
- labeled
- unlabeled
jobs:
manage_jira_issue:
runs-on: ubuntu-latest
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_SM_READONLY_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SM_READONLY_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: get secrets from aws sm
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/jira
parse-json-secrets: true
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- name: install dependencies
env:
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts
run: pip install -r ${SCRIPT_DIR}/requirements.txt
- name: install pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: Manage JIRA Issue
env:
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts
JIRA_TOKEN: ${{ env.JIRA_TOKEN }}
JIRA_USER: ${{ env.JIRA_USER }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_LABELS: ${{ join(github.event.issue.labels.*.name) }}
ISSUE_STATE: ${{ github.event.issue.state }}
EVENT_NAME: ${{ github.event.action }}
run: python ${SCRIPT_DIR}/jira_helper.py ISSUE --verbose -p K8S