Skip to content

Commit

Permalink
Improve setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
choffmeister committed Jan 18, 2023
1 parent d918ff4 commit 3dfac1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
run: git-ops-update version
- uses: airfocusio/git-ops-update/setup@main
with:
version: v0.4.0
version: v0.5.0
- name: Verify
run: git-ops-update version
5 changes: 3 additions & 2 deletions setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ runs:
- if: inputs.version == 'latest'
run: |
cd /tmp
URL=$(curl -fsSL https://api.github.com/repos/airfocusio/git-ops-update/releases/${{ inputs.version }} | jq -r '.assets[] | select(.name|test("linux_amd64\\.tar\\.gz$")) | .browser_download_url')
URL=$(curl -fsSL https://api.github.com/repos/airfocusio/git-ops-update/releases/latest | jq -r '.assets[] | select(.name|test("linux_amd64\\.tar\\.gz$")) | .browser_download_url')
curl -fsSL "$URL" | tar xz
mv git-ops-update /usr/local/bin
git-ops-update version
shell: bash
- if: inputs.version != 'latest'
run: |
cd /tmp
URL=$(curl -fsSL https://api.github.com/repos/airfocusio/git-ops-update/releases/tags/${{ inputs.version }} | jq -r '.assets[] | select(.name|test("linux_amd64\\.tar\\.gz$")) | .browser_download_url')
VERSION="$(echo ${{ inputs.version }} | sed 's#^v##')"
URL="https://github.com/airfocusio/git-ops-update/releases/download/v${VERSION}/git-ops-update_${VERSION}_linux_amd64.tar.gz"
curl -fsSL "$URL" | tar xz
mv git-ops-update /usr/local/bin
git-ops-update version
Expand Down

0 comments on commit 3dfac1f

Please sign in to comment.