diff --git a/.github/workflows/aps-cypress-e2e.yaml b/.github/workflows/aps-cypress-e2e.yaml index 918a69a7d..5b5eea26e 100644 --- a/.github/workflows/aps-cypress-e2e.yaml +++ b/.github/workflows/aps-cypress-e2e.yaml @@ -26,36 +26,32 @@ jobs: - name: Checkout Portal uses: actions/checkout@v2 - - - name: Checkout Source Repository - run: | - git clone https://github.com/bcgov/gwa-cli.git - cd gwa-cli - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: '1.20.x' - - name: create .env file + - name: Determine Download file name + id: set_variable run: | - cd gwa-cli - echo "GWA_API_HOST=api-services-portal-feature-gwa-cli-v2.apps.silver.devops.gov.bc.ca" >> .env - echo "GWA_CLIENT_ID=gwa-cli" >> .env - - - name: Debug - run: echo ${{ github.workspace }} + echo ${{ runner.arch }} + if [ "${{ runner.arch }}" == "X64" ]; then + echo "::set-output name=my_variable::gwa_Linux_x86_64.tgz" + elif [ "${{ runner.arch }}" == "ARM64" ]; then + echo "::set-output name=my_variable::gwa_Linux_arm64.tgz" + else + echo "unsupported architecture" + fi + + - name: Download Binar + uses: robinraju/release-downloader@v1.8 + with: + repository: "bcgov/gwa-cli" + latest: true + fileName: ${{ steps.set_variable.outputs.my_variable }} + out-file-path: "${{ github.workspace }}/e2e" - - name: Build + - name: Unzip file run: | - cd gwa-cli - go clean - go build -o ${{ github.workspace }}/e2e/gwa - - - uses: actions/upload-artifact@v2 - with: - name: binary-artifact - path: ${{ github.workspace }}/e2e + cd ${{ github.workspace }}/e2e + tar xvzf ${{ steps.set_variable.outputs.my_variable }} - name: Build Docker Images run: | diff --git a/e2e/Dockerfile b/e2e/Dockerfile index a77289f4a..b253160d1 100644 --- a/e2e/Dockerfile +++ b/e2e/Dockerfile @@ -7,6 +7,7 @@ COPY cypress.config.ts /e2e COPY tsconfig.json /e2e COPY package.json /e2e COPY package-lock.json /e2e +COPY *.yml /e2e COPY entrypoint.sh /tmp COPY gwa /usr/local/bin ADD cypress /e2e/cypress