From ae90b9a41c9a80566cb1047ba8106279eec69369 Mon Sep 17 00:00:00 2001 From: Otieno Calvine <35563516+NYARAS@users.noreply.github.com> Date: Thu, 26 Aug 2021 21:02:32 +0300 Subject: [PATCH] fix: fix deployment job specific branch (#23) Signed-off-by: Otieno Calvine --- .github/workflows/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index e11ab5db..dc9327ea 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -18,7 +18,7 @@ jobs: environment: name: test, staging, production # run only in these three environment # TODO: add develop - if: contains(github.head_ref, 'opensource') || contains(github.head_ref, 'main') + if: github.ref == 'refs/heads/opensource' || github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v2 @@ -48,7 +48,7 @@ jobs: environment: name: test # TODO: add develop - if: contains(github.head_ref, 'opensource') + if: github.ref == 'refs/heads/opensource' needs: [build_and_push_image] steps: - name: Checkout working branches @@ -91,7 +91,7 @@ jobs: environment: name: production needs: [build_and_push_image] - if: contains(github.head_ref, 'main') + if: github.ref == 'refs/heads/main' steps: - name: Checkout working branches uses: actions/checkout@v2 @@ -133,7 +133,7 @@ jobs: environment: name: staging needs: [build_and_push_image] - if: contains(github.head_ref, 'opensource') + if: github.ref == 'refs/heads/opensource' steps: - name: Checkout working branches uses: actions/checkout@v2