mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
added github run
This commit is contained in:
parent
8948e64e13
commit
ae182bb81f
1 changed files with 34 additions and 34 deletions
68
.github/workflows/push_docker_image_to_ecr.yml
vendored
68
.github/workflows/push_docker_image_to_ecr.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Build and Push Docker Image to ECR lambda example
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [feature/elmhurst_epr, main]
|
||||
branches: [feature/seperate_terraform_with_different_states, main]
|
||||
|
||||
env:
|
||||
AWS_REGION: eu-west-2
|
||||
|
|
@ -48,42 +48,42 @@ jobs:
|
|||
echo "Pushing Docker image to ECR..."
|
||||
docker push $IMAGE_URI
|
||||
|
||||
build-and-push-to-ecr-for-extractor-and-loader-example:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ECR_REPOSITORY: extractor_and_loader
|
||||
# build-and-push-to-ecr-for-extractor-and-loader-example:
|
||||
# runs-on: ubuntu-latest
|
||||
# env:
|
||||
# ECR_REPOSITORY: extractor_and_loader
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
# permissions:
|
||||
# id-token: write
|
||||
# contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
- name: AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
# as of 14/07/2025 it'll be using user:Junte's keys
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
# - name: AWS credentials
|
||||
# uses: aws-actions/configure-aws-credentials@v4
|
||||
# with:
|
||||
# # as of 14/07/2025 it'll be using user:Junte's keys
|
||||
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
# aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Log in to Amazon ECR
|
||||
id: login-ecr
|
||||
uses: aws-actions/amazon-ecr-login@v2
|
||||
# - name: Log in to Amazon ECR
|
||||
# id: login-ecr
|
||||
# uses: aws-actions/amazon-ecr-login@v2
|
||||
|
||||
- name: Build, tag, and push Docker image to ECR
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
IMAGE_TAG: latest5
|
||||
run: |
|
||||
IMAGE_URI=${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
|
||||
echo "pwd"
|
||||
pwd
|
||||
ls -la
|
||||
echo "Building Docker image..."
|
||||
docker build -t $IMAGE_URI -f deployment/extractor_and_loader/Dockerfile .
|
||||
# - name: Build, tag, and push Docker image to ECR
|
||||
# env:
|
||||
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
# IMAGE_TAG: latest5
|
||||
# run: |
|
||||
# IMAGE_URI=${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
|
||||
# echo "pwd"
|
||||
# pwd
|
||||
# ls -la
|
||||
# echo "Building Docker image..."
|
||||
# docker build -t $IMAGE_URI -f deployment/extractor_and_loader/Dockerfile .
|
||||
|
||||
echo "Pushing Docker image to ECR..."
|
||||
docker push $IMAGE_URI
|
||||
# echo "Pushing Docker image to ECR..."
|
||||
# docker push $IMAGE_URI
|
||||
Loading…
Add table
Reference in a new issue