Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
debug deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
vladupshot committed Dec 29, 2023
1 parent f161a68 commit 3e2360f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/deploy_aws_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,26 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
id: compute-node-build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: upshot-compute-node-staging
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and push it to ECR so that it can be deployed to ECS.
docker build -f docker/Dockerfile --build-arg "ghcr_token=${{ secrets.GHCR_TOKEN }}" -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> "$GITHUB_OUTPUT"
# - name: Build, tag, and push image to Amazon ECR
# id: compute-node-build-image
# env:
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# ECR_REPOSITORY: upshot-compute-node-staging
# IMAGE_TAG: ${{ github.sha }}
# run: |
# # Build a docker container and push it to ECR so that it can be deployed to ECS.
# docker build -f docker/Dockerfile --build-arg "ghcr_token=${{ secrets.GHCR_TOKEN }}" -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> "$GITHUB_OUTPUT"

- name: Fill in the new image ID in the Amazon ECS task definition
id: compute-node-task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: infra/staging-task-def.json
container-name: upshot-compute-node
image: ${{ steps.compute-node-build-image.outputs.image }}
image: nginx:latest
# ${{ steps.compute-node-build-image.outputs.image }}

- name: upshot-compute-node - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
Expand Down

0 comments on commit 3e2360f

Please sign in to comment.