name: containerd-debug description: Conditionally enable debug for containerd related executions. inputs: debug: description: Enable debug? required: false default: ${{ vars.CONTAINERD_DEBUG }} runs: using: "composite" steps: - id: skopeo_debug name: Enable skopeo debugging env: DEBUG: ${{ inputs.debug }} shell: bash run: | if [[ ! -z ${DEBUG} ]]; then echo "SKOPEO_OPTS=\"${SKOPEO_OPTS} --debug\"" >> $GITHUB_ENV echo "skopeo_debug_opts=\"--debug\"" >> $GITHUB_OUTPUT fi - id: containerd_debug name: Enable containerd debugging env: DEBUG: ${{ inputs.debug }} shell: bash run: | if [[ ! -z ${DEBUG} ]]; then echo "CONTAINERD_CMD_OPTS=\"${CONTAINERD_CMD_OPTS} --log-level=debug\"" >> $GITHUB_ENV echo "containerd_cmd_debug_opts=\"--log-level=debug\"" >> $GITHUB_OUTPUT fi outputs: skopeo_debug_opts: description: empty if no debug; otherwise debug enablement options for the `skopeo` CLI command. value: ${{ steps.skopeo_debug.outputs.skopeo_debug_opts }} containerd_cmd_debug_opts: description: empty if no debug; otherwise debug enablement options for the containerd CLI command. value: ${{ steps.containerd_debug.outputs.containerd_cmd_debug_opts }}