move back to using a secret #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
GITHUB_TOKEN: | ||
required: true | ||
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 }} |