Skip to content

Commit 52e43d4

Browse files
ES-1622: Switch corda/corda Github Actions to use Github App for authentication (corda#7577)
* Update jira_assign_issue.yml * Update jira_close_issue.yml * Update jira_create_issue.yml * Update .github/workflows/jira_assign_issue.yml * Update .github/workflows/jira_assign_issue.yml --------- Co-authored-by: Waldemar Żurowski <45210402+wzur-r3@users.noreply.github.com>
1 parent afbd396 commit 52e43d4

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.github/workflows/jira_assign_issue.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ jobs:
88
sync_assigned:
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: Generate a token
12+
id: generate_token
13+
uses: actions/create-github-app-token@v1
14+
with:
15+
app-id: ${{ secrets.AUTH_APP_ID }}
16+
private-key: ${{ secrets.AUTH_APP_PK }}
1117
- name: Assign
1218
uses: corda/jira-sync-assigned-action@master
1319
with:
1420
jiraBaseUrl: ${{ secrets.JIRA_BASE_URL }}
1521
jiraEmail: ${{ secrets.JIRA_USER_EMAIL }}
1622
jiraToken: ${{ secrets.JIRA_API_TOKEN }}
17-
token: ${{ secrets.GH_TOKEN }}
23+
token: ${{ steps.generate_token.outputs.token }}
1824
owner: corda
1925
repository: corda

.github/workflows/jira_close_issue.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ jobs:
88
sync_closed:
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: Generate a token
12+
id: generate_token
13+
uses: actions/create-github-app-token@v1
14+
with:
15+
app-id: ${{ secrets.AUTH_APP_ID }}
16+
private-key: ${{ secrets.AUTH_APP_PK }}
1117
- name: Close
1218
uses: corda/jira-sync-closed-action@master
1319
with:
1420
jiraBaseUrl: https://r3-cev.atlassian.net
1521
jiraEmail: ${{ secrets.JIRA_USER_EMAIL }}
1622
jiraToken: ${{ secrets.JIRA_API_TOKEN }}
17-
token: ${{ secrets.GH_TOKEN }}
23+
token: ${{ steps.generate_token.outputs.token }}
1824
owner: corda
1925
repository: corda

.github/workflows/jira_create_issue.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v2
1212

13+
- name: Generate a token
14+
id: generate_token
15+
uses: actions/create-github-app-token@v1
16+
with:
17+
app-id: ${{ secrets.AUTH_APP_ID }}
18+
private-key: ${{ secrets.AUTH_APP_PK }}
19+
1320
- name: Jira Create issue
1421
id: create
1522
uses: corda/jira-create-issue-action@master
@@ -30,7 +37,7 @@ jobs:
3037
- name: Create comment
3138
uses: peter-evans/create-or-update-comment@v1
3239
with:
33-
token: ${{ secrets.GH_TOKEN }}
40+
token: ${{ steps.generate_token.outputs.token }}
3441
issue-number: ${{ github.event.issue.number }}
3542
body: |
3643
Automatically created Jira issue: ${{ steps.create.outputs.issue }}

0 commit comments

Comments
 (0)