From 77f68a3207152148a2a2e5fc66975f2526029a59 Mon Sep 17 00:00:00 2001 From: Piotr Janus Date: Fri, 5 Jun 2026 23:51:32 +0200 Subject: [PATCH] fix downloading pre-built binary --- action.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/action.yaml b/action.yaml index a3976da..d046d18 100644 --- a/action.yaml +++ b/action.yaml @@ -11,12 +11,22 @@ outputs: runs: using: 'composite' steps: + # github.action_ref is empty inside a composite action's run steps (and + # leaks the ref of `uses:` steps like actions/cache). github.action_path is + # reliable; its last segment is the ref: .../_actions/// + - name: Resolve action ref + id: meta + shell: bash + run: | + AP="${{ github.action_path }}" + echo "version=${AP##*/}" >> "$GITHUB_OUTPUT" + - name: Restore cached binary id: cache uses: actions/cache@v4 with: path: /tmp/cac - key: cac-${{ runner.os }}-${{ runner.arch }}-${{ github.action_ref || github.ref_name }} + key: cac-${{ runner.os }}-${{ runner.arch }}-${{ steps.meta.outputs.version }} - name: Download pre-built binary id: download @@ -24,8 +34,8 @@ runs: shell: bash continue-on-error: true run: | - VERSION="${{ github.action_ref || github.ref_name }}" - REPO="${{ github.action_repository }}" + VERSION="${{ steps.meta.outputs.version }}" + REPO="SecureAuthCorp/ciam-config-as-code" ARCH=$(uname -m) case "$ARCH" in