fix(ci): Skip test jobs in docker backend workflow if no changes have been made

The CI runner can't pull an image that doesn't exist
because it hasn't been built if no changes have been made to the backend.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-11-21 13:23:28 +01:00
parent 9fae96f622
commit 794b0ffdcb

View file

@ -63,21 +63,21 @@ jobs:
sqlite-test:
runs-on: ubuntu-latest
if: needs.changes.outputs.changed == 'true'
needs: [ build-dev, changes ]
container:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }}
steps:
- run: cd /usr/src/app && yarn run test
if: needs.changes.outputs.changed == 'true'
sqlite-e2e:
runs-on: ubuntu-latest
if: needs.changes.outputs.changed == 'true'
needs: [ build-dev, changes ]
container:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }}
steps:
- run: cd /usr/src/app && yarn run test:e2e
if: needs.changes.outputs.changed == 'true'
build-prod:
runs-on: ubuntu-latest