Skip to content

Commit

Permalink
Update GitHub release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Oct 3, 2023
1 parent d6e3008 commit 920b6bf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/actions/install-aws/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: Set up AWS CLI

inputs:
aws-access-key-id:
required: true
type: string
aws-secret-access-key:
required: true
type: string

runs:
using: "composite"
steps:
Expand All @@ -13,7 +21,7 @@ runs:
# shell: bash
- name: Configure AWS CLI
run: |
export AWS_ACCESS_KEY_ID={{ secrets.AWS_ACCESS_KEY_ID }}
export AWS_SECRET_ACCESS_KEY={{ secrets.AWS_SECRET_ACCESS_KEY }}
export AWS_ACCESS_KEY_ID={{ inputs.aws-access-key-id }}
export AWS_SECRET_ACCESS_KEY={{ inputs.aws-secret-access-key }}
aws configure --region eu-west-2 --output json
shell: bash
3 changes: 3 additions & 0 deletions .github/workflows/cd-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ jobs:
docker-image-name: ${{ vars.DOCKER_IMAGE_NAME }}
- name: Install AWS CLI
uses: ./.github/actions/install-aws
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# TODO: Deploy new feature environment
3 changes: 3 additions & 0 deletions .github/workflows/cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ jobs:
docker-image-name: ${{ vars.DOCKER_IMAGE_NAME }}
- name: Install AWS CLI
uses: ./.github/actions/install-aws
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy to AWS
run: aws ssm put-parameter --profile preview --name "/devops/private-beta/version" --type "String" --value "${{ steps.version-tag.outputs.VERSION }}" --overwrite
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ jobs:
docker-image-name: ${{ vars.DOCKER_IMAGE_NAME }}
- name: Install AWS CLI
uses: ./.github/actions/install-aws
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy to AWS
run: aws ssm put-parameter --profile staging --name "/devops/private-beta/version" --type "String" --value "${{ steps.version-tag.outputs.VERSION }}" --overwrite

0 comments on commit 920b6bf

Please sign in to comment.