Skip to content

Commit

Permalink
Specify the git ref to checkout during deploy (#95)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ConsoleCatzirl authored Jan 13, 2025
1 parent 414b959 commit 8d25507
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/aws-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.environment }}
- name: Install AWS CLI
run: sudo snap install aws-cli --classic
- name: Install AWS CDK CLI
Expand Down

0 comments on commit 8d25507

Please sign in to comment.