Skip to content

Commit

Permalink
fix: pulling from previous job
Browse files Browse the repository at this point in the history
  • Loading branch information
voodooGQ committed Feb 12, 2024
1 parent 110e8a4 commit 9f0d1b9
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
setup:
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:
# # Setup Auth token to push to github packages
- name: Set NPM Config
Expand Down Expand Up @@ -56,10 +60,6 @@ jobs:
role-duration-seconds: 1200
role-session-name: SageECRPushSession

build_and_push:
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
Expand Down Expand Up @@ -98,50 +98,54 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

build_and_push:
needs: [setup]
runs-on: ubuntu-latest
steps:
# Docs Site
- name: Build and push docs site
uses: docker/build-push-action@v2
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_DOCS }}
IMAGE_SHA_TAG: ${{ steps.gitsha.outputs.value }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
with:
file: ./docs/Dockerfile
build-args: |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}
context: ./docs
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY_SAGE_DOCS }}:${{ steps.gitsha.outputs.value }}-release-${{ env.postfix }}
${{ needs.setup.outputs.ecr_registry }}/${{ secrets.ECR_REPOSITORY_SAGE_DOCS }}:${{ needs.setup.outputs.gitsha }}-release-${{ needs.setup.outputs.postfix }}
# Storybook Site
- name: Build and push storybook
uses: docker/build-push-action@v2
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_STORYBOOK }}
IMAGE_SHA_TAG: ${{ steps.gitsha.outputs.value }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
with:
file: ./packages/sage-react/Dockerfile
build-args: |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}
context: ./packages/sage-react/
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY_SAGE_STORYBOOK }}:${{ steps.gitsha.outputs.value }}-release-${{ env.postfix }}
${{ needs.setup.outputs.ecr_registry }}/${{ secrets.ECR_REPOSITORY_SAGE_STORYBOOK }}:${{ needs.setup.outputs.gitsha }}-release-${{ needs.setup.outputs.postfix }}
# Sassdocs Site
- name: Build and push sassdocs
uses: docker/build-push-action@v2
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REGISTRY: ${{ needs.setup.outputs.ecr_registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_SAGE_SASSDOCS }}
IMAGE_SHA_TAG: ${{ steps.gitsha.outputs.value }}
IMAGE_SHA_TAG: ${{ needs.setup.outputs.gitsha }}
with:
file: ./packages/sage-assets/Dockerfile
build-args: |
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }}
context: ./packages/sage-assets/
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY_SAGE_SASSDOCS }}:${{ steps.gitsha.outputs.value }}-release-${{ env.postfix }}
${{ needs.setup.outputs.ecr_registry }}/${{ secrets.ECR_REPOSITORY_SAGE_SASSDOCS }}:${{ needs.setup.outputs.gitsha }}-release-${{ needs.setup.outputs.postfix }}

0 comments on commit 9f0d1b9

Please sign in to comment.