Skip to content

Commit 8d25507

Browse files
Specify the git ref to checkout during deploy (#95)
When triggering jobs with `workflow_run` the default git ref to fetch is the default branch[0], causing all deploys to use the dev branch. Override the default ref with the name of the environment in order to deploy from the corresponding branch. [0] https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_run
1 parent 414b959 commit 8d25507

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/aws-deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
steps:
3939
- name: Checkout repository
4040
uses: actions/checkout@v3
41+
with:
42+
ref: ${{ inputs.environment }}
4143
- name: Install AWS CLI
4244
run: sudo snap install aws-cli --classic
4345
- name: Install AWS CDK CLI

0 commit comments

Comments
 (0)