From c666ff11ef3eb5eb7a6a3549681119a8eeb74096 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 11 Jun 2024 11:33:19 -0400 Subject: [PATCH] update use-action for Windows Signed-off-by: Jason Hall --- .github/workflows/use-action.yaml | 16 +++++++++------- action.yml | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/use-action.yaml b/.github/workflows/use-action.yaml index 46c5808..15c50e1 100644 --- a/.github/workflows/use-action.yaml +++ b/.github/workflows/use-action.yaml @@ -1,6 +1,8 @@ name: Use Action on: + pull_request: + branches: ['main'] push: branches: ['main'] @@ -9,30 +11,30 @@ jobs: name: Use Action strategy: matrix: - platform: [ubuntu-latest, macos-latest] + platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v5 with: - go-version: 1.20.x - - uses: actions/checkout@v2 + go-version: 1.21.x + - uses: actions/checkout@v4 - - uses: imjasonh/setup-crane@main + - uses: ./ - run: | crane digest ubuntu crane manifest ubuntu | jq crane copy ubuntu ghcr.io/${{ github.repository }}/ubuntu-copy - name: Install old release - uses: imjasonh/setup-crane@main + uses: ./ with: version: v0.12.0 - name: Check installed version run: crane version | grep 0.12.0 - name: Install from tip - uses: imjasonh/setup-crane@main + uses: ./ with: version: tip - name: Check installed version (tip) diff --git a/action.yml b/action.yml index 43aa4df..8c8240a 100644 --- a/action.yml +++ b/action.yml @@ -35,11 +35,11 @@ runs: if [[ $os == "macOS" ]]; then os="Darwin" fi - + arch=$(uname -m) if [[ "$arch" =~ (aarch64|arm64) ]] ; then arch=arm64 - fi + fi if [[ ! -z ${tag} ]]; then echo "Installing crane @ ${tag} for ${os} on ${arch}"