Skip to content

Commit

Permalink
Simplify the github workflow (#12)
Browse files Browse the repository at this point in the history
Instead of hard coding the branch name for deployments we can
dynamically get it using ${{ github.ref_name }}.  This simplifies
the workflow assuming that we match our branch name to deployment
environments.
  • Loading branch information
zaro0508 authored Nov 13, 2024
1 parent f5000bf commit 2dfcf6b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aws-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
environment:
required: true
type: string
default: "dev"
default: ${{ github.ref_name }}

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
with:
role-to-assume: "arn:aws:iam::631692904429:role/sagebase-github-oidc-sage-bionetworks-schematic-infra"
role-session-name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}
environment: "dev"
1 change: 0 additions & 1 deletion .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
with:
role-to-assume: "arn:aws:iam::878654265857:role/sagebase-github-oidc-sage-bionetworks-schematic-infra"
role-session-name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}
environment: "prod"
1 change: 0 additions & 1 deletion .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
with:
role-to-assume: "arn:aws:iam::878654265857:role/sagebase-github-oidc-sage-bionetworks-schematic-infra"
role-session-name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}
environment: "stage"

0 comments on commit 2dfcf6b

Please sign in to comment.