Skip to content

Commit

Permalink
fix(setup-conftest): normalize runner.os (#216)
Browse files Browse the repository at this point in the history
* fix(setup-conftest): normalize runner.os

* fix: follow suggestion

* fix: uppercase OS
  • Loading branch information
Duologic authored Aug 15, 2024
1 parent 6a252ee commit 318d33e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actions/setup-conftest/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ runs:
path: ${{ github.workspace }}/bin/conftest
key: conftest-${{ runner.os }}-${{ runner.arch }}-${{ inputs.version }}

- if: runner.os == 'macOS'
shell: sh
run: echo "OS=Darwin" >> "$GITHUB_ENV"

# runner.arch options: X86, X64, ARM, or ARM64.
# conftest release: arm64, x86_64, ppc64le, s390x.
# If it ain't arm64 or x86_64, it'll fall back to runner.arch.
Expand All @@ -36,7 +40,7 @@ runs:
with:
repo: "open-policy-agent/conftest"
version: "tags/v${{ inputs.version }}"
file: "conftest_${{ inputs.version }}_${{ runner.os }}_${{ env.ARCH || runner.arch }}.tar.gz"
file: "conftest_${{ inputs.version }}_${{ env.OS || runner.os }}_${{ env.ARCH || runner.arch }}.tar.gz"
target: ${{ github.workspace }}/bin/conftest.tgz

- name: Unpack tarball
Expand Down

0 comments on commit 318d33e

Please sign in to comment.