Skip to content

Commit

Permalink
fix: ecr registry not outputting, trying in secondary job
Browse files Browse the repository at this point in the history
  • Loading branch information
voodooGQ committed Feb 12, 2024
1 parent 07edaf4 commit acba8b8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
needs: [lint-test-build]
runs-on: ubuntu-latest
outputs:
ecr_registry: ${{ steps.login-ecr.outputs.registry }}
postfix: ${{ env.postfix }}
gitsha: ${{ steps.gitsha.outputs.value }}
steps:
Expand Down Expand Up @@ -81,14 +80,16 @@ jobs:
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
steps:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: true

- name: Set branch name if not PR
if: github.event_name != 'pull_request'
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
Expand All @@ -107,7 +108,7 @@ jobs:
- name: Build and push docs site
uses: docker/build-push-action@v2
env:
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_DOCS }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
POSTFIX: ${{ needs.setup.outputs.postfix }}
Expand All @@ -124,7 +125,7 @@ jobs:
- name: Build and push storybook
uses: docker/build-push-action@v2
env:
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_STORYBOOK }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
POSTFIX: ${{ needs.setup.outputs.postfix }}
Expand All @@ -141,7 +142,7 @@ jobs:
- name: Build and push sassdocs
uses: docker/build-push-action@v2
env:
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_SASSDOCS }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
POSTFIX: ${{ needs.setup.outputs.postfix }}
Expand Down

0 comments on commit acba8b8

Please sign in to comment.