From c2024f698d248888b73d8794d71b5128bc08748c Mon Sep 17 00:00:00 2001 From: Jared Edwards Date: Tue, 29 Nov 2022 16:51:57 -0700 Subject: [PATCH] Update main.yaml --- .github/workflows/main.yaml | 88 ++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0fb6394..7c9a1e2 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -40,15 +40,15 @@ jobs: cd $HOME echo "Install argo" # Download the binary - curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$RUNNER_ARCH.gz + curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$ARCH.gz # Unzip - gunzip argo-linux-$RUNNER_ARCH.gz + gunzip argo-linux-$ARCH.gz # Make binary executable - chmod +x argo-linux-$RUNNER_ARCH + chmod +x argo-linux-$ARCH # Move binary to path - sudo mv ./argo-linux-$RUNNER_ARCH /usr/local/bin/argo + sudo mv ./argo-linux-$ARCH /usr/local/bin/argo # Test installation - argo version --short + argo version --short - name: Check out repository code uses: actions/checkout@v3 - run: echo ${GITHUB_REPOSITORY} @@ -74,20 +74,36 @@ jobs: needs: publish runs-on: self-hosted steps: + - name: Define Arch arm64 + if: "${{ runner.arch == 'ARM64' }}" + shell: bash + run: | + echo "Setting arch to ARM64" + ARCH=arm64 + echo "ARCH=$ARCH" >> $GITHUB_ENV + - name: Define Arch amd64 + if: "${{ runner.arch == 'X64' }}" + shell: bash + run: | + echo "Setting arch to amd64" + ARCH=amd64 + echo "ARCH=$ARCH" >> $GITHUB_ENV - name: Setup Runner for Argo + env: + ARCH: ${{ env.ARCH }} run: | cd $HOME echo "Install argo" # Download the binary - curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$RUNNER_ARCH.gz + curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$ARCH.gz # Unzip - gunzip argo-linux-$RUNNER_ARCH.gz + gunzip argo-linux-$ARCH.gz # Make binary executable - chmod +x argo-linux-$RUNNER_ARCH + chmod +x argo-linux-$ARCH # Move binary to path - sudo mv ./argo-linux-$RUNNER_ARCH /usr/local/bin/argo + sudo mv ./argo-linux-$ARCH /usr/local/bin/argo # Test installation - argo version --short + argo version --short - name: Check out repository code uses: actions/checkout@v3 - name: development @@ -109,20 +125,36 @@ jobs: needs: development runs-on: self-hosted steps: + - name: Define Arch arm64 + if: "${{ runner.arch == 'ARM64' }}" + shell: bash + run: | + echo "Setting arch to ARM64" + ARCH=arm64 + echo "ARCH=$ARCH" >> $GITHUB_ENV + - name: Define Arch amd64 + if: "${{ runner.arch == 'X64' }}" + shell: bash + run: | + echo "Setting arch to amd64" + ARCH=amd64 + echo "ARCH=$ARCH" >> $GITHUB_ENV - name: Setup Runner for Argo + env: + ARCH: ${{ env.ARCH }} run: | cd $HOME echo "Install argo" # Download the binary - curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$RUNNER_ARCH.gz + curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$ARCH.gz # Unzip - gunzip argo-linux-$RUNNER_ARCH.gz + gunzip argo-linux-$ARCH.gz # Make binary executable - chmod +x argo-linux-$RUNNER_ARCH + chmod +x argo-linux-$ARCH # Move binary to path - sudo mv ./argo-linux-$RUNNER_ARCH /usr/local/bin/argo + sudo mv ./argo-linux-$ARCH /usr/local/bin/argo # Test installation - argo version --short + argo version --short - name: Check out repository code uses: actions/checkout@v3 - name: staging @@ -144,20 +176,36 @@ jobs: needs: staging runs-on: self-hosted steps: + - name: Define Arch arm64 + if: "${{ runner.arch == 'ARM64' }}" + shell: bash + run: | + echo "Setting arch to ARM64" + ARCH=arm64 + echo "ARCH=$ARCH" >> $GITHUB_ENV + - name: Define Arch amd64 + if: "${{ runner.arch == 'X64' }}" + shell: bash + run: | + echo "Setting arch to amd64" + ARCH=amd64 + echo "ARCH=$ARCH" >> $GITHUB_ENV - name: Setup Runner for Argo + env: + ARCH: ${{ env.ARCH }} run: | cd $HOME echo "Install argo" # Download the binary - curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-amd64.gz + curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-$ARCH.gz # Unzip - gunzip argo-linux-amd64.gz + gunzip argo-linux-$ARCH.gz # Make binary executable - chmod +x argo-linux-amd64 + chmod +x argo-linux-$ARCH # Move binary to path - sudo mv ./argo-linux-amd64 /usr/local/bin/argo + sudo mv ./argo-linux-$ARCH /usr/local/bin/argo # Test installation - argo version --short + argo version --short - name: Check out repository code uses: actions/checkout@v3 - name: release