Skip to content

Commit 11446e2

Browse files
committed
Add slash command '/test-gmt-master' to test GMT master branch
1 parent 8e2b369 commit 11446e2

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/ci_tests_dev.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
# branches: [ master ]
99
pull_request:
1010
types: [review_requested, ready_for_review]
11+
repository_dispatch:
12+
types: [test-gmt-master-command]
1113
# Schedule daily tests
1214
schedule:
1315
- cron: '0 0 * * *'
@@ -36,10 +38,31 @@ jobs:
3638
# Checkout current git repository
3739
- name: Checkout
3840
uses: actions/[email protected]
41+
if: github.event_name != 'repository_dispatch'
3942
with:
4043
# fecth all history so that setuptools-scm works
4144
fetch-depth: 0
4245

46+
# Generate token from GenericMappingTools bot
47+
- name: Generate token from GenericMappingTools bot
48+
uses: tibdex/github-app-token@v1
49+
if: github.event_name == 'repository_dispatch'
50+
id: generate-token
51+
with:
52+
app_id: ${{ secrets.APP_ID }}
53+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
54+
55+
# Checkout the pull request branch
56+
- name: Checkout
57+
uses: actions/checkout@v2
58+
if: github.event_name == 'repository_dispatch'
59+
with:
60+
token: ${{ steps.generate-token.outputs.token }}
61+
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
62+
ref: ${{ github.event.client_payload.pull_request.head.ref }}
63+
# fecth all history so that setuptools-scm works
64+
fetch-depth: 0
65+
4366
# Setup Miniconda
4467
- name: Setup Miniconda
4568
uses: conda-incubator/[email protected]
@@ -106,3 +129,12 @@ jobs:
106129
with:
107130
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
108131
path: tmp-test-dir-with-unique-name
132+
133+
- name: Add reaction
134+
uses: peter-evans/create-or-update-comment@v1
135+
if: github.event_name == 'repository_dispatch'
136+
with:
137+
token: ${{ steps.generate-token.outputs.token }}
138+
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
139+
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
140+
reaction-type: hooray

.github/workflows/slash-command-dispatch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ jobs:
2121
token: ${{ steps.generate-token.outputs.token }}
2222
commands: |
2323
format
24+
test-gmt-master
2425
issue-type: pull-request
2526
permission: none

0 commit comments

Comments
 (0)