Skip to content

Commit

Permalink
Define gh envirnoment based on branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
ccruzkauppila committed Jan 7, 2025
1 parent 5a58677 commit b6bd627
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
environment: |-
${{
github.ref_name == 'production' && 'production'
|| github.ref_name == 'staging' && 'staging'
|| 'development'
}}
services:
postgres:
image: postgres:14
Expand Down Expand Up @@ -83,7 +89,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: build

environment: |-
${{
github.ref_name == 'production' && 'production'
|| github.ref_name == 'staging' && 'staging'
|| 'development'
}}
steps:
# Checkout the repository
- name: Checkout code
Expand Down

0 comments on commit b6bd627

Please sign in to comment.