Skip to content

Commit 4a96b2e

Browse files
committed
Add GitHub workflows to replace the Azure Pipelines
This is a continuation of the work done in gitgitgadget/gitgitgadget#1392. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 371afac commit 4a96b2e

File tree

5 files changed

+193
-0
lines changed

5 files changed

+193
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Handle new mails
2+
3+
on:
4+
# GitGitGadget's GitHub App is expected to trigger this on `git-mailing-list-mirror` updates
5+
workflow_dispatch:
6+
7+
jobs:
8+
handle-new-mails:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/create-github-app-token@v1
13+
id: gitgitgadget-git-token
14+
with:
15+
app-id: ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
16+
private-key: ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
17+
owner: gitgitgadget
18+
repositories: git
19+
- uses: actions/create-github-app-token@v1
20+
id: git-git-token
21+
with:
22+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
23+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
24+
owner: git
25+
repositories: git
26+
- uses: actions/create-github-app-token@v1
27+
id: dscho-git-token
28+
with:
29+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
30+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
31+
owner: dscho
32+
repositories: git
33+
- uses: gitgitgadget/gitgitgadget/handle-new-mails@v1
34+
with:
35+
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
36+
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
37+
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Handle a PR comment
2+
run-name: Handle slash command in a PR comment`
3+
4+
on:
5+
# GitGitGadget's GitHub App is expected to trigger this on `issue_comment` events
6+
# that have the `action` set to `created` or `edited`
7+
workflow_dispatch:
8+
inputs:
9+
pr-comment-url:
10+
description: 'URL of the PR comment to handle'
11+
required: true
12+
13+
env:
14+
PR_COMMENT_URL: ${{ inputs.pr-comment-url }}
15+
16+
jobs:
17+
handle-pr-comment:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/create-github-app-token@v1
22+
id: gitgitgadget-git-token
23+
with:
24+
app-id: ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
25+
private-key: ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
26+
owner: gitgitgadget
27+
repositories: git
28+
- uses: actions/create-github-app-token@v1
29+
id: git-git-token
30+
with:
31+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
32+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
33+
owner: git
34+
repositories: git
35+
- uses: actions/create-github-app-token@v1
36+
id: dscho-git-token
37+
with:
38+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
39+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
40+
owner: dscho
41+
repositories: git
42+
- uses: gitgitgadget/gitgitgadget/handle-pr-comment@v1
43+
with:
44+
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
45+
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
46+
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}
47+
smtp-host: smtp.gmail.com
48+
smtp-user: [email protected]
49+
smtp-pass: "${{ secrets.GITGITGADGET_SMTP_PASS }}"
50+
pr-comment-url: ${{ env.PR_COMMENT_URL }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Handle pushes to PRs
2+
run-name: Check and validate commits pushed to a PR
3+
4+
on:
5+
# GitGitGadget's GitHub App is expected to trigger this on `pull_request` events
6+
# that have the `action` set to `opened` or `synchronize`
7+
workflow_dispatch:
8+
inputs:
9+
pr-url:
10+
description: 'URL of the PR to handle'
11+
required: true
12+
13+
env:
14+
PR_URL: ${{ inputs.pr-url }}
15+
16+
jobs:
17+
handle-pr-push:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/create-github-app-token@v1
22+
id: gitgitgadget-git-token
23+
with:
24+
app-id: ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
25+
private-key: ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
26+
owner: gitgitgadget
27+
repositories: git
28+
- uses: actions/create-github-app-token@v1
29+
id: git-git-token
30+
with:
31+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
32+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
33+
owner: git
34+
repositories: git
35+
- uses: actions/create-github-app-token@v1
36+
id: dscho-git-token
37+
with:
38+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
39+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
40+
owner: dscho
41+
repositories: git
42+
- uses: gitgitgadget/gitgitgadget/handle-pr-push@v1
43+
with:
44+
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
45+
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
46+
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}
47+
pr-url: ${{ env.PR_URL }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Update Mail to Commit Notes
2+
run-name: Update the `mail-to-commit` and `commit-to-mail` Git notes
3+
4+
on:
5+
# GitGitGadget's GitHub App is expected to trigger this on `seen` updates
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-mail-to-commit-notes:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/create-github-app-token@v1
14+
id: gitgitgadget-git-token
15+
with:
16+
app-id: ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
17+
private-key: ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
18+
owner: gitgitgadget
19+
repositories: git
20+
- uses: gitgitgadget/gitgitgadget/update-mail-to-commit-notes@v1
21+
with:
22+
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}

.github/workflows/update-prs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Update GitGitGadget's PRs
2+
3+
on:
4+
# GitGitGadget's GitHub App is expected to trigger this on `seen` updates
5+
workflow_dispatch:
6+
7+
jobs:
8+
update-prs:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/create-github-app-token@v1
13+
id: gitgitgadget-git-token
14+
with:
15+
app-id: ${{ secrets.GITGITGADGET_GITHUB_APP_ID }}
16+
private-key: ${{ secrets.GITGITGADGET_GITHUB_APP_PRIVATE_KEY }}
17+
owner: gitgitgadget
18+
repositories: git
19+
- uses: actions/create-github-app-token@v1
20+
id: git-git-token
21+
with:
22+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
23+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
24+
owner: git
25+
repositories: git
26+
- uses: actions/create-github-app-token@v1
27+
id: dscho-git-token
28+
with:
29+
app-id: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_ID }}
30+
private-key: ${{ secrets.GITGITGADGET_GIT_GITHUB_APP_PRIVATE_KEY }}
31+
owner: dscho
32+
repositories: git
33+
- uses: gitgitgadget/gitgitgadget/update-prs@v1
34+
with:
35+
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
36+
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
37+
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}

0 commit comments

Comments
 (0)