-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (40 loc) · 1.77 KB
/
handle-new-mails.yml
File metadata and controls
44 lines (40 loc) · 1.77 KB
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
name: Handle new mails
on:
# GitGitGadget's GitHub App is expected to trigger this on `git-mailing-list-mirror` updates
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
jobs:
handle-new-mails:
runs-on: ubuntu-latest
if: vars.CONFIG != ''
steps:
- uses: actions/create-github-app-token@v1
id: pr-repo-token
with:
app-id: ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
private-key: ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ fromJSON(vars.CONFIG).repo.owner }}
repositories: ${{ fromJSON(vars.CONFIG).repo.name }}
- uses: actions/create-github-app-token@v1
if: ${{ contains(fromJSON(vars.CONFIG).repo.owners, fromJSON(vars.CONFIG).repo.baseOwner) }}
id: upstream-repo-token
with:
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ fromJSON(vars.CONFIG).repo.baseOwner }}
repositories: ${{ fromJSON(vars.CONFIG).repo.name }}
- uses: actions/create-github-app-token@v1
if: ${{ contains(fromJSON(vars.CONFIG).repo.owners, fromJSON(vars.CONFIG).repo.testOwner) }}
id: test-repo-token
with:
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
owner: ${{ fromJSON(vars.CONFIG).repo.testOwner }}
repositories: ${{ fromJSON(vars.CONFIG).repo.name }}
- uses: gitgitgadget/gitgitgadget/handle-new-mails@v1
with:
config: ${{ vars.CONFIG }}
pr-repo-token: ${{ steps.pr-repo-token.outputs.token }}
upstream-repo-token: ${{ steps.upstream-repo-token.outputs.token }}
test-repo-token: ${{ steps.test-repo-token.outputs.token }}