From 268f0e681111da4f6c42134cbab7dc0885613449 Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Wed, 3 Nov 2021 18:02:29 +0530 Subject: [PATCH] Correct URL to download polaris tar (#660) --- .github/actions/setup-polaris/get_polaris.sh | 5 +++-- .github/workflows/test_setup.yml | 4 ++-- docs/infrastructure-as-code.md | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-polaris/get_polaris.sh b/.github/actions/setup-polaris/get_polaris.sh index 69444a25..594ba43b 100755 --- a/.github/actions/setup-polaris/get_polaris.sh +++ b/.github/actions/setup-polaris/get_polaris.sh @@ -3,15 +3,16 @@ if [[ -z "$INPUT_VERSION" ]]; then echo "Missing polaris version information" exit 1 fi +POLARIS_URL=https://github.com/FairwindsOps/polaris/releases/download/$INPUT_VERSION/polaris_linux_amd64.tar.gz polaris version | grep "$INPUT_VERSION" &> /dev/null if [ $? == 0 ]; then echo "Polaris $INPUT_VERSION is already installed! Exiting gracefully." exit 0 else - echo "Installing polaris to path." + echo "Installing polaris to path from " $POLARIS_URL fi TARGET_FILE="polaris.tar.gz" -curl -LJ -o $TARGET_FILE 'https://github.com/FairwindsOps/polaris/releases/download/'"$INPUT_VERSION"'/polaris_'"$INPUT_VERSION"'_linux_386.tar.gz' +curl -LJ -o $TARGET_FILE $POLARIS_URL mkdir polaris tar -xzf $TARGET_FILE -C polaris rm $TARGET_FILE diff --git a/.github/workflows/test_setup.yml b/.github/workflows/test_setup.yml index f595918b..9a148c0d 100644 --- a/.github/workflows/test_setup.yml +++ b/.github/workflows/test_setup.yml @@ -11,7 +11,7 @@ jobs: - name: Setup polaris uses: ./.github/actions/setup-polaris with: - version: 3.0.3 + version: 4.2.0 - name: Use command run: polaris version @@ -22,6 +22,6 @@ jobs: - name: Setup polaris uses: fairwindsops/polaris/.github/actions/setup-polaris@master with: - version: 3.0.3 + version: 4.2.0 - name: Use command run: polaris version diff --git a/docs/infrastructure-as-code.md b/docs/infrastructure-as-code.md index 887bcbc7..8309d8b9 100644 --- a/docs/infrastructure-as-code.md +++ b/docs/infrastructure-as-code.md @@ -88,9 +88,9 @@ The version number of the release tag. ##### Example usage ```yaml -uses: fairwindsops/polaris@master +uses: fairwindsops/polaris/.github/actions/setup-polaris@master with: - version: "3.0.3" + version: 4.2.0 ``` Example inside a job: @@ -99,9 +99,9 @@ Example inside a job: steps: - uses: actions/checkout@v2 - name: Setup polaris - uses: fairwindsops/polaris@master + uses: fairwindsops/polaris/.github/actions/setup-polaris@master with: - version: 3.0.3 + version: 4.2.0 - name: Use command run: polaris version