Skip to content

Commit

Permalink
fix: fix deployment job specific branch (#23)
Browse files Browse the repository at this point in the history
Signed-off-by: Otieno Calvine <nyarangaotieno@gmail.com>
  • Loading branch information
NYARAS committed Aug 26, 2021
1 parent 4c81eaf commit ae90b9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ae90b9a

Please sign in to comment.