test
This commit is contained in:
@@ -17,13 +17,20 @@ inputs:
|
|||||||
path:
|
path:
|
||||||
description: "The path to search for."
|
description: "The path to search for."
|
||||||
required: true
|
required: true
|
||||||
args:
|
name:
|
||||||
|
description: "The name pattern to search for."
|
||||||
|
required: true
|
||||||
|
default: ""
|
||||||
|
additionalArgs:
|
||||||
description: "Additional arguments."
|
description: "Additional arguments."
|
||||||
required: false
|
required: false
|
||||||
outputs:
|
outputs:
|
||||||
files:
|
files:
|
||||||
description: "The path of the found file."
|
description: "The path of the found file."
|
||||||
value: ${{ steps.output.outputs.files }}
|
value: ${{ steps.output.outputs.files }}
|
||||||
|
console:
|
||||||
|
description: "The console output of the command."
|
||||||
|
value: ${{ steps.output.outputs.console }}
|
||||||
success:
|
success:
|
||||||
description: "Whether files were found."
|
description: "Whether files were found."
|
||||||
value: ${{ steps.output.outputs.success }}
|
value: ${{ steps.output.outputs.success }}
|
||||||
@@ -33,8 +40,17 @@ runs:
|
|||||||
- name: "Build command."
|
- name: "Build command."
|
||||||
id: command
|
id: command
|
||||||
run: |
|
run: |
|
||||||
COMMAND="find '${{ inputs.path }}' ${{ inputs.args }}"
|
COMMAND="find \"${{ inputs.path }}\" ${{ inputs.additionalArgs }}"
|
||||||
echo "command=$COMMAND" >> "$GITHUB_OUTPUT"
|
echo "command=$COMMAND" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
if [[ -n "${{ inputs.name }}" ]]; then
|
||||||
|
COMMAND="$COMMAND --name \"${{ inputs.name }}\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${{ inputs.tags }}" ]]; then
|
||||||
|
COMMAND="$COMMAND --exec \"mc tag list {}\""
|
||||||
|
fi
|
||||||
|
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: "Find file in S3."
|
- name: "Find file in S3."
|
||||||
id: find
|
id: find
|
||||||
@@ -54,7 +70,7 @@ runs:
|
|||||||
if [[ "$RESULT" != "0" ]]; then
|
if [[ "$RESULT" != "0" ]]; then
|
||||||
SUCCESS="false"
|
SUCCESS="false"
|
||||||
else
|
else
|
||||||
echo "files<<EOF" >> "$GITHUB_OUTPUT"
|
echo "console<<EOF" >> "$GITHUB_OUTPUT"
|
||||||
echo "${{ steps.find.outputs.console }}" >> "$GITHUB_OUTPUT"
|
echo "${{ steps.find.outputs.console }}" >> "$GITHUB_OUTPUT"
|
||||||
echo "EOF" >> "$GITHUB_OUTPUT"
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
||||||
SUCCESS="true"
|
SUCCESS="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user