From 0564885aa6a83432ff2f8181c30f5289929ce066 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sun, 16 Mar 2025 21:20:07 +0000 Subject: [PATCH] Fix e2e CI --- .github/workflows/check.yml | 3 --- .github/workflows/publish-docker.yml | 8 ++++---- scripts/e2e.sh | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 712c7521..5acccc1f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,9 +25,6 @@ jobs: - name: Setup rust run: | - echo "github.ref: ${{ github.ref }}" - echo "github.ref_type: ${{ github.ref_type }}" - echo "github.event_name: ${{ github.event_name }}" cargo install sqlx-cli cd backend sqlx database create --database-url sqlite://db.sqlite3 diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index aad55fe6..46f37967 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -35,7 +35,7 @@ jobs: # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer - name: Install cosign - if: startsWith(github.ref, 'refs/tags/') + if: github.ref_type == 'tag' uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0 with: cosign-release: "v2.2.4" @@ -49,7 +49,7 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} - if: startsWith(github.ref, 'refs/tags/') + if: github.ref_type == 'tag' uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ${{ env.REGISTRY }} @@ -71,7 +71,7 @@ jobs: uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: context: backend - push: ${{ startsWith(github.ref, 'refs/tags/') }} + push: ${{ github.ref_type == 'tag' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha @@ -83,7 +83,7 @@ jobs: # transparency data even for private images, pass --force to cosign below. # https://github.com/sigstore/cosign - name: Sign the published Docker image - if: startsWith(github.ref, 'refs/tags/') + if: ${{ github.ref_type == 'tag' }} env: # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable TAGS: ${{ steps.meta.outputs.tags }} diff --git a/scripts/e2e.sh b/scripts/e2e.sh index 3e0747be..993795a9 100755 --- a/scripts/e2e.sh +++ b/scripts/e2e.sh @@ -17,7 +17,7 @@ mkdir -p logs cd frontend npm run build -./wait-for-server.sh +../scripts/wait-for-server.sh pids=() for i in $(seq 1 $process_count); do