-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.84 KB
/
command-run.yaml
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
45
46
47
48
49
50
51
52
53
name: Run Command
on:
repository_dispatch:
types:
- run-command
jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Create URL to the run output
id: vars
run: echo ::set-output name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
- name: Create comment
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
body: |
[Command run output][1]
[1]: ${{ steps.vars.outputs.run-url }}
- name: Dump the client payload context
env:
PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }}
run: echo "$PAYLOAD_CONTEXT"
- name: Checkout
uses: actions/checkout@v3
- name: Authenticate to Google Cloud Platform
id: auth-gcloud
uses: google-github-actions/auth@v0
with:
create_credentials_file: true
access_token_lifetime: 900s
workload_identity_provider: 'xxxx'
service_account: 'xxxx'
- name: Get GKE Cluster Credentials
run: |-
gcloud container clusters get-credentials xxxx --region asia-northeast1
- name: Run Load Testing
env:
PROJECT: ${{ github.event.client_payload.slash_command.args.named.project }}
SCRIPT: ${{ github.event.client_payload.slash_command.args.named.script }}
ADDITIONAL_ARGS: ${{ github.event.client_payload.slash_command.args.named.args }}
PARAL: ${{ github.event.client_payload.slash_command.args.named.paral }}
shell: bash
run: .github/bin/run-load-testing.sh