From 8b249e191752c307fcd6c3b7ab5d8235a44d8d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szpiech?= Date: Mon, 2 Oct 2023 16:12:24 +0200 Subject: [PATCH] chore(ci): fix some minor issues in workflows (#4953) --- .github/workflows/ci-cd-trigger.yml | 2 +- .github/workflows/cypress-run.yml | 5 +++-- .github/workflows/publish-dist.yml | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd-trigger.yml b/.github/workflows/ci-cd-trigger.yml index 5fe246392..d1753a0c9 100644 --- a/.github/workflows/ci-cd-trigger.yml +++ b/.github/workflows/ci-cd-trigger.yml @@ -191,7 +191,7 @@ jobs: echo "e2e-needed=true" >> $GITHUB_OUTPUT elif [ ${{ github.base_ref }} == 'main' ]; then echo "e2e-needed=true" >> $GITHUB_OUTPUT - elif [ ${{ github.event_name }} == 'push' ] && [ ${{ contains(github.ref_name, 'release/') }} ]; then + elif [[ ${{ github.event_name }} == 'push' && ${{ contains(github.ref_name, 'release/') }} ]]; then echo "e2e-needed=true" >> $GITHUB_OUTPUT else echo "e2e-needed=false" >> $GITHUB_OUTPUT diff --git a/.github/workflows/cypress-run.yml b/.github/workflows/cypress-run.yml index 150d4b199..deae2ae7b 100644 --- a/.github/workflows/cypress-run.yml +++ b/.github/workflows/cypress-run.yml @@ -23,9 +23,9 @@ jobs: run: | if [ ${{ github.base_ref }} == 'main' ]; then echo "runner=mainnet-compatible-runner" >> $GITHUB_OUTPUT - elif [ ${{ github.base_ref }} == 'develop' ] && [ ${{ github.ref_name }} == 'main' ]; then + elif [[ ${{ github.base_ref }} == 'develop' && ${{ github.ref_name }} == 'main' ]]; then echo "runner=mainnet-compatible-runner" >> $GITHUB_OUTPUT - elif [ ${{ github.event_name }} == 'push' ] && [ ${{ contains(github.ref_name, 'release/mainnet') }} ]; then + elif [[ ${{ github.event_name }} == 'push' && ${{ contains(github.ref_name, 'release/mainnet') }} ]]; then echo "runner=mainnet-compatible-runner" >> $GITHUB_OUTPUT else echo "runner=self-hosted-runner" >> $GITHUB_OUTPUT @@ -85,6 +85,7 @@ jobs: - name: Run Vegacapsule network and Vega wallet id: setup-vega uses: ./frontend-monorepo/.github/actions/run-vegacapsule + timeout-minutes: 10 ###### ## Run some tests diff --git a/.github/workflows/publish-dist.yml b/.github/workflows/publish-dist.yml index f4ef0d7fc..622d25b71 100644 --- a/.github/workflows/publish-dist.yml +++ b/.github/workflows/publish-dist.yml @@ -63,7 +63,7 @@ jobs: echo IS_IPFS_RELEASE=true >> $GITHUB_ENV - name: Is S3 Release - if: ${{ env.IS_IPFS_RELEASE == 'false' && github.event_name == 'push' }} + if: ${{ env.IS_IPFS_RELEASE == 'false' && github.event_name == 'push' && github.ref_name != 'main'}} run: | echo IS_S3_RELEASE=true >> $GITHUB_ENV @@ -195,7 +195,7 @@ jobs: ENV_NAME=${{ env.ENV_NAME }} tags: | vegaprotocol/${{ matrix.app }}:${{ github.sha }} - vegaprotocol/${{ matrix.app }}:${{ env.IS_MAINNET_RELEASE == 'true' && 'mainnet' || env.IS_TESTNET_RELEASE == 'true' && 'testnet' || env.IS_DEV_IMAGE == 'true' && 'develop' || env.IS_MAIN_IMAGE == 'true && main' || '' }} + vegaprotocol/${{ matrix.app }}:${{ env.IS_MAINNET_RELEASE == 'true' && 'mainnet' || env.IS_TESTNET_RELEASE == 'true' && 'testnet' || env.IS_DEV_IMAGE == 'true' && 'develop' || env.IS_MAIN_IMAGE == 'true' && 'main' || '' }} - name: Publish dist as docker image (ghcr - retry) uses: docker/build-push-action@v3 @@ -222,7 +222,7 @@ jobs: ENV_NAME=${{ env.ENV_NAME }} tags: | vegaprotocol/${{ matrix.app }}:${{ github.sha }} - vegaprotocol/${{ matrix.app }}:${{ env.IS_MAINNET_RELEASE == 'true' && 'mainnet' || env.IS_TESTNET_RELEASE == 'true' && 'testnet' || env.IS_DEV_IMAGE == 'true' && 'develop' || env.IS_MAIN_IMAGE == 'true && main' || '' }} + vegaprotocol/${{ matrix.app }}:${{ env.IS_MAINNET_RELEASE == 'true' && 'mainnet' || env.IS_TESTNET_RELEASE == 'true' && 'testnet' || env.IS_DEV_IMAGE == 'true' && 'develop' || env.IS_MAIN_IMAGE == 'true' && 'main' || '' }} # bucket creation in github.com/vegaprotocol/terraform//frontend - name: Publish dist to s3