Files
my-rook-config/.github/workflows/collect-logs/action.yaml
T
Workflow config file is invalid. Please check your config file: unknown on type: 0
Joshua Hoblitt 48dacb1894 ci: fix shellcheck issues in composite actions
actionlint only understands workflow files, so the .github/actionlint.yaml
ignore keeps the composite action definitions out of `make lint.workflows`.
Apply the same shellcheck fixes there anyway, found by running shellcheck over
their run: blocks directly:

- quote unquoted variable expansions (SC2086): the $GITHUB_ENV writes in
  collect-logs, tmate_debug and upterm_debug, and ${ARCH} in the cri-dockerd
  install in integration-test-setup-cluster-resources
- split `export BLOCK=$(...)` into a separate assignment and export so a
  failing command substitution is not masked (SC2155) in
  encryption-pvc-kms-ibm-kp

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-22 16:04:55 -07:00

42 lines
1.3 KiB
YAML

# This isn't to be used for the go integration tests because their logs are placed in a different location and require few extra steps.
name: Log Collector
description: Log collector for canary test
inputs:
name:
description: Name to use for the workflow
required: true
additional-namespace:
description: Additional namespace to collect
required: false
runs:
using: "composite"
steps:
- name: sanitize input name
id: sanitize
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
raw="${{ inputs.name }}"
no_colon="${raw//:/-}"
no_slash="${no_colon////-}"
# echo to $GITHUB_OUTPUT doesn't work in composite steps:
# https://github.com/actions/runner/issues/2009#issuecomment-1793565031
echo "ARTIFACT_NAME=${no_slash}" >> "$GITHUB_ENV"
- name: collect common logs
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
export ADDITIONAL_NAMESPACE="${{ inputs.additional-namespace }}"
tests/scripts/collect-logs.sh
- name: log artifact name
shell: bash --noprofile --norc -eo pipefail {0}
run: |
echo ${{ env.ARTIFACT_NAME }}
- name: Upload canary test result
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.ARTIFACT_NAME }}
path: test