Run migrations only if the their service changed
@@ -251,7 +251,8 @@ jobs:
# Migrate the database
migrate-pycon-backend-db:
runs-on: ubuntu-latest
- needs: [terraform]
+ needs: [terraform, changed-services]
+ if: contains(fromJSON(needs.changed-services.outputs.services), 'pycon-backend')
steps:
- uses: actions/checkout@master
with:
@@ -268,7 +269,8 @@ jobs:
migrate-users-backend-db:
runs-on: ubuntu-latest
- needs: [terraform]
+ needs: [terraform, changed-services]
+ if: contains(fromJSON(needs.changed-services.outputs.services), 'users-backend')
steps:
- uses: actions/checkout@master
with:
@@ -285,7 +287,8 @@ jobs:
migrate-association-backend-db:
runs-on: ubuntu-latest
- needs: [terraform]
+ needs: [terraform, changed-services]
+ if: contains(fromJSON(needs.changed-services.outputs.services), 'association-backend')
steps:
- uses: actions/checkout@master
with:
