diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9086ec1b4..7725fbbb9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,6 +1,9 @@ name: check on: [push] -# can't use `env` since it doesn't work in e2e.steps[0].uses +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }}/e2e + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: lint: runs-on: ubuntu-22.04 @@ -24,7 +27,7 @@ jobs: - name: Log in to the Container registry uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -32,7 +35,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/${{ github.repository }}/e2e + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image uses: docker/build-push-action@v6 @@ -47,5 +50,6 @@ jobs: e2e: runs-on: ubuntu-22.04 needs: build-and-push-image + container: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH_NAME }} steps: - - uses: docker://ghcr.io/${{ github.repository }}/e2e:${{ github.head_ref || github.ref_name }} + - run: /urbanstats/test-ci.sh diff --git a/react/test/Dockerfile b/react/test/Dockerfile index ba8e593b0..a086cc3ba 100644 --- a/react/test/Dockerfile +++ b/react/test/Dockerfile @@ -22,4 +22,4 @@ RUN apt-get -y install libx11-6:i386 RUN apt-get -y install fluxbox COPY ./ ./ -CMD /urbanstats/test-ci.sh \ No newline at end of file +ENTRYPOINT [ "/bin/bash" ] \ No newline at end of file