Skip to content

move back to using a secret #1

move back to using a secret

move back to using a secret #1

Workflow file for this run

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:

Check failure on line 30 in .github/workflows/ship-logs.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ship-logs.yaml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
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 }}