refactor(actions): nest binary and code runners under run-vociferate/
This commit is contained in:
@@ -66,7 +66,7 @@ runs:
|
|||||||
- name: Run binary
|
- name: Run binary
|
||||||
id: run-binary
|
id: run-binary
|
||||||
if: steps.resolve-runtime.outputs.use_binary == 'true'
|
if: steps.resolve-runtime.outputs.use_binary == 'true'
|
||||||
uses: ../run-vociferate.binary
|
uses: ./binary
|
||||||
with:
|
with:
|
||||||
root: ${{ inputs.root }}
|
root: ${{ inputs.root }}
|
||||||
version-file: ${{ inputs.version-file }}
|
version-file: ${{ inputs.version-file }}
|
||||||
@@ -81,7 +81,7 @@ runs:
|
|||||||
- name: Run source
|
- name: Run source
|
||||||
id: run-code
|
id: run-code
|
||||||
if: steps.resolve-runtime.outputs.use_binary != 'true'
|
if: steps.resolve-runtime.outputs.use_binary != 'true'
|
||||||
uses: ../run-vociferate.code
|
uses: ./code
|
||||||
with:
|
with:
|
||||||
root: ${{ inputs.root }}
|
root: ${{ inputs.root }}
|
||||||
version-file: ${{ inputs.version-file }}
|
version-file: ${{ inputs.version-file }}
|
||||||
|
|||||||
@@ -53,8 +53,12 @@ runs:
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
source_root="$GITHUB_ACTION_PATH"
|
source_root="$GITHUB_ACTION_PATH"
|
||||||
|
while [[ ! -f "$source_root/go.mod" ]] && [[ "$source_root" != "/" ]]; do
|
||||||
|
source_root="$(realpath "$source_root/..")"
|
||||||
|
done
|
||||||
if [[ ! -f "$source_root/go.mod" ]]; then
|
if [[ ! -f "$source_root/go.mod" ]]; then
|
||||||
source_root="$(realpath "$GITHUB_ACTION_PATH/..")"
|
echo "Could not locate Go module root from $GITHUB_ACTION_PATH" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf 'source_root=%s\n' "$source_root" >> "$GITHUB_OUTPUT"
|
printf 'source_root=%s\n' "$source_root" >> "$GITHUB_OUTPUT"
|
||||||
Reference in New Issue
Block a user