-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (66 loc) · 1.91 KB
/
ship-logs.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
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Ship Logs
on:
workflow_call:
inputs:
repository:
type: string
required: false
default: ${{ github.repository }}
run-id:
type: string
required: true
description: Run logs to download
log-index:
type: string
required: false
description: Log index to ship to
default: "github-action-logs"
opensearch-host:
required: true
type: string
opensearch-user:
required: true
type: string
timeout-minutes:
required: false
type: number
default: 15
description: maximum time log shipping should run for
secrets:
OPENVPN_CONFIG:
required: true
DEV_PEM:
required: true
OPENSEARCH_PASSWORD:
required: true
jobs:
ship_logs:
runs-on: ubuntu-22.04
name: Ship Logs
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- id: target-repo
env:
REPOSITORY: ${{ inputs.repository }}
shell: bash
run: |
#@begin=bash@
set -x
PARTS=(${REPOSITORY//\// })
echo "org=${PARTS[0]}" >> $GITHUB_OUTPUT
echo "repo=${PARTS[1]}" >> $GITHUB_OUTPUT
#@end=bash@
- uses: tonicai/gha-toolbox/runner/vpn@main
with:
vpn_config: ${{ secrets.OPENVPN_CONFIG }}
dev_pem: ${{ secrets.DEV_PEM }}
- uses: tonicai/gha-toolbox/github/ship-logs@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_org: ${{ steps.target-repo.outputs.org }}
github_repository: ${{ steps.target-repo.outputs.repo }}
github_run_id: ${{ inputs.run-id }}
opensearch_host: ${{ inputs.opensearch-host }}
opensearch_index: ${{ inputs.log-index }}
opensearch_user: ${{ inputs.opensearch-user }}
opensearch_password: ${{ secrets.OPENSEARCH_PASSWORD }}