ES-1622: Switch corda/corda Github Actions to use Github App for authentication (#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>
This commit is contained in:
Jacob Scott 2023-11-16 16:21:07 +00:00 committed by GitHub
parent afbd39660b
commit 52e43d4223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 3 deletions

View File

@ -8,12 +8,18 @@ jobs:
sync_assigned: sync_assigned:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.AUTH_APP_ID }}
private-key: ${{ secrets.AUTH_APP_PK }}
- name: Assign - name: Assign
uses: corda/jira-sync-assigned-action@master uses: corda/jira-sync-assigned-action@master
with: with:
jiraBaseUrl: ${{ secrets.JIRA_BASE_URL }} jiraBaseUrl: ${{ secrets.JIRA_BASE_URL }}
jiraEmail: ${{ secrets.JIRA_USER_EMAIL }} jiraEmail: ${{ secrets.JIRA_USER_EMAIL }}
jiraToken: ${{ secrets.JIRA_API_TOKEN }} jiraToken: ${{ secrets.JIRA_API_TOKEN }}
token: ${{ secrets.GH_TOKEN }} token: ${{ steps.generate_token.outputs.token }}
owner: corda owner: corda
repository: corda repository: corda

View File

@ -8,12 +8,18 @@ jobs:
sync_closed: sync_closed:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.AUTH_APP_ID }}
private-key: ${{ secrets.AUTH_APP_PK }}
- name: Close - name: Close
uses: corda/jira-sync-closed-action@master uses: corda/jira-sync-closed-action@master
with: with:
jiraBaseUrl: https://r3-cev.atlassian.net jiraBaseUrl: https://r3-cev.atlassian.net
jiraEmail: ${{ secrets.JIRA_USER_EMAIL }} jiraEmail: ${{ secrets.JIRA_USER_EMAIL }}
jiraToken: ${{ secrets.JIRA_API_TOKEN }} jiraToken: ${{ secrets.JIRA_API_TOKEN }}
token: ${{ secrets.GH_TOKEN }} token: ${{ steps.generate_token.outputs.token }}
owner: corda owner: corda
repository: corda repository: corda

View File

@ -10,6 +10,13 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.AUTH_APP_ID }}
private-key: ${{ secrets.AUTH_APP_PK }}
- name: Jira Create issue - name: Jira Create issue
id: create id: create
uses: corda/jira-create-issue-action@master uses: corda/jira-create-issue-action@master
@ -30,7 +37,7 @@ jobs:
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v1
with: with:
token: ${{ secrets.GH_TOKEN }} token: ${{ steps.generate_token.outputs.token }}
issue-number: ${{ github.event.issue.number }} issue-number: ${{ github.event.issue.number }}
body: | body: |
Automatically created Jira issue: ${{ steps.create.outputs.issue }} Automatically created Jira issue: ${{ steps.create.outputs.issue }}