From 7cc74df9226998c89b36de297fe8d5d61d79324f Mon Sep 17 00:00:00 2001 From: Tristan van Triest Date: Wed, 4 Dec 2024 11:46:39 +0100 Subject: [PATCH 1/2] Update more deploy scripts --- .github/workflows/deploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5b8f821..99802f6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,9 +1,6 @@ name: Deploy to Production on: - push: - branches: - - main pull_request: types: - closed @@ -12,6 +9,7 @@ on: jobs: build_and_test: + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' name: Build and test runs-on: ubuntu-latest steps: @@ -69,6 +67,7 @@ jobs: name: Deploy to Production if: github.event.pull_request.merged == true || github.event_name == 'push' runs-on: ubuntu-latest + needs: build_and_push steps: - name: Run compose script in Deployment repository. uses: benc-uk/workflow-dispatch@v1 From 1ec2001da17d83103989a0a73eda00cbb1e252a0 Mon Sep 17 00:00:00 2001 From: Tristan van Triest Date: Wed, 4 Dec 2024 11:50:03 +0100 Subject: [PATCH 2/2] Change PR checkout runner script --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 997ab85..e7ac482 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,7 @@ jobs: with: token: ${{ secrets.SHARED_PAT }} submodules: recursive + ref: ${{ github.event.pull_request.head.sha }} - name: Build and start services run: |