refactor(actions): simplify run-vociferate runtime flow

This commit is contained in:
Micheal Wilkinson
2026-03-21 14:50:29 +00:00
parent 58e29aca0c
commit 1306f07003
5 changed files with 107 additions and 156 deletions

View File

@@ -51,38 +51,23 @@ runs:
steps:
- name: Resolve runtime
id: resolve-runtime
uses: ../resolve-vociferate-runtime
shell: bash
env:
ACTION_REF: ${{ github.action_ref }}
run: |
set -euo pipefail
- name: Setup Go
if: steps.resolve-runtime.outputs.use_binary != 'true'
uses: actions/setup-go@v5
with:
go-version: '1.26.1'
cache: true
cache-dependency-path: ${{ steps.resolve-runtime.outputs.source_root }}/go.sum
- name: Restore cached binary
id: cache-vociferate
if: steps.resolve-runtime.outputs.use_binary == 'true'
uses: actions/cache@v4
with:
path: ${{ steps.resolve-runtime.outputs.cache_dir }}
key: vociferate-${{ steps.resolve-runtime.outputs.cache_token }}-linux-${{ runner.arch }}
- name: Download binary
if: steps.resolve-runtime.outputs.use_binary == 'true' && steps.cache-vociferate.outputs.cache-hit != 'true'
uses: ../download-vociferate-binary
with:
token: ${{ github.token }}
asset-url: ${{ steps.resolve-runtime.outputs.asset_url }}
binary-path: ${{ steps.resolve-runtime.outputs.binary_path }}
if [[ "$ACTION_REF" == v* ]]; then
printf 'use_binary=true\n' >> "$GITHUB_OUTPUT"
else
printf 'use_binary=false\n' >> "$GITHUB_OUTPUT"
fi
- name: Run binary
id: run-binary
if: steps.resolve-runtime.outputs.use_binary == 'true'
uses: ../run-vociferate.binary
with:
binary-path: ${{ steps.resolve-runtime.outputs.binary_path }}
root: ${{ inputs.root }}
version-file: ${{ inputs.version-file }}
version-pattern: ${{ inputs.version-pattern }}
@@ -98,7 +83,6 @@ runs:
if: steps.resolve-runtime.outputs.use_binary != 'true'
uses: ../run-vociferate.code
with:
source-root: ${{ steps.resolve-runtime.outputs.source_root }}
root: ${{ inputs.root }}
version-file: ${{ inputs.version-file }}
version-pattern: ${{ inputs.version-pattern }}