From 730df0f8e03bd43a9bb07dfda1adb4d62cde4486 Mon Sep 17 00:00:00 2001 From: u-ways Date: Wed, 1 May 2024 09:39:12 +0100 Subject: [PATCH] Only run deployment steps on the main branch --- .github/workflows/cd-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cd-workflow.yml b/.github/workflows/cd-workflow.yml index 3583758..57eb754 100644 --- a/.github/workflows/cd-workflow.yml +++ b/.github/workflows/cd-workflow.yml @@ -33,6 +33,7 @@ jobs: Deploy-Image: needs: Export-Image runs-on: ubuntu-22.04 + if: github.ref == 'refs/heads/main' steps: - name: 'Deploying App image' run: echo "Deploying App image... (mocked)" @@ -53,6 +54,7 @@ jobs: Deploy-Doc: needs: Export-Doc runs-on: ubuntu-22.04 + if: github.ref == 'refs/heads/main' steps: - name: 'Downloading OpenAPI schema' uses: actions/download-artifact@v4