Skip to content

Commit

Permalink
gradio pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
ajithvcoder committed Nov 25, 2024
1 parent 271947f commit b425dba
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/ec2-pipeline-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,59 @@ on:
workflow_dispatch:
jobs:

build-and-push-ecr-image:
name: Build and push ECR image
runs-on: ubuntu-latest
outputs:
commit_id: ${{ steps.get_commit_id.outputs.commit_id }}
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Utilities
run: |
sudo apt-get update
sudo apt-get install -y jq unzip
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

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

- name: Get latest commit ID
id: get_commit_id
run: |
latest_commit=$(git rev-parse HEAD)
echo "::set-output name=commit_id::$latest_commit"
- name: Display the commit ID
run: |
echo "Latest commit ID is: ${{ steps.get_commit_id.outputs.commit_id }}"
- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_NAME }}
IMAGE_TAG: latest
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
# build-and-push-ecr-image:
# name: Build and push ECR image
# runs-on: ubuntu-latest
# outputs:
# commit_id: ${{ steps.get_commit_id.outputs.commit_id }}
# steps:
# - name: Checkout Code
# uses: actions/checkout@v3

# - name: Install Utilities
# run: |
# sudo apt-get update
# sudo apt-get install -y jq unzip
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ secrets.AWS_REGION }}

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

# - name: Get latest commit ID
# id: get_commit_id
# run: |
# latest_commit=$(git rev-parse HEAD)
# echo "::set-output name=commit_id::$latest_commit"


# - name: Display the commit ID
# run: |
# echo "Latest commit ID is: ${{ steps.get_commit_id.outputs.commit_id }}"


# - name: Build, tag, and push image to Amazon ECR
# id: build-image
# env:
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_NAME }}
# IMAGE_TAG: latest
# run: |
# # Build a docker container and
# # push it to ECR so that it can
# # be deployed to ECS.
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

launch-runner:
runs-on: ubuntu-latest
needs: build-and-push-ecr-image
# needs: build-and-push-ecr-image
outputs:
commit_id: ${{ steps.get_commit_id_runner.outputs.commit_id }}
steps:
Expand All @@ -79,7 +79,7 @@ jobs:
run: |
cml runner launch \
--cloud=aws \
--name=session-08 \
--name=session-10 \
--cloud-region=ap-south-1 \
--cloud-type=g4dn.xlarge \
--cloud-hdd-size=64 \
Expand Down

0 comments on commit b425dba

Please sign in to comment.