Skip to content

Commit

Permalink
fix: registry env not being set, testing
Browse files Browse the repository at this point in the history
  • Loading branch information
voodooGQ committed Feb 12, 2024
1 parent 152bfe6 commit 07edaf4
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,6 @@ jobs:
with:
version: v0.9.1

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.SAGE_ECR_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SAGE_ECR_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 1200
role-session-name: SageECRPushSession

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Determine git sha to checkout
uses: haya14busa/action-cond@v1
id: gitsha
Expand All @@ -85,6 +71,20 @@ jobs:
echo "postfix=staging" >> $GITHUB_ENV
fi
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.SAGE_ECR_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SAGE_ECR_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 1200
role-session-name: SageECRPushSession

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

build_and_push:
needs: [setup]
runs-on: ubuntu-latest
Expand All @@ -110,14 +110,15 @@ jobs:
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_DOCS }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
POSTFIX: ${{ needs.setup.outputs.postfix }}
with:
file: ./docs/Dockerfile
build-args: |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}
context: ./docs
push: true
tags: |
${{ needs.setup.outputs.ecr_registry }}/${{ secrets.ECR_REPOSITORY_SAGE_DOCS }}:${{ needs.setup.outputs.gitsha }}-release-${{ needs.setup.outputs.postfix }}
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_SHA_TAG }}-release-${{ env.POSTFIX }}
# Storybook Site
- name: Build and push storybook
Expand All @@ -126,14 +127,15 @@ jobs:
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_STORYBOOK }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
POSTFIX: ${{ needs.setup.outputs.postfix }}
with:
file: ./packages/sage-react/Dockerfile
build-args: |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}
context: ./packages/sage-react/
push: true
tags: |
${{ needs.setup.outputs.ecr_registry }}/${{ secrets.ECR_REPOSITORY_SAGE_STORYBOOK }}:${{ needs.setup.outputs.gitsha }}-release-${{ needs.setup.outputs.postfix }}
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_SHA_TAG }}-release-${{ env.POSTFIX }}
# Sassdocs Site
- name: Build and push sassdocs
Expand All @@ -142,11 +144,12 @@ jobs:
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_SASSDOCS }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
POSTFIX: ${{ needs.setup.outputs.postfix }}
with:
file: ./packages/sage-assets/Dockerfile
build-args: |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}
context: ./packages/sage-assets/
push: true
tags: |
${{ needs.setup.outputs.ecr_registry }}/${{ secrets.ECR_REPOSITORY_SAGE_SASSDOCS }}:${{ needs.setup.outputs.gitsha }}-release-${{ needs.setup.outputs.postfix }}
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_SHA_TAG }}-release-${{ env.POSTFIX }}

0 comments on commit 07edaf4

Please sign in to comment.