mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
see if this runs
This commit is contained in:
parent
9a914a6e97
commit
f754072922
2 changed files with 89 additions and 89 deletions
89
.github/workflows/lambda_workflows/main.yml
vendored
Normal file
89
.github/workflows/lambda_workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
name: Script to deploy lambdas to aws
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [feature/seperate_terraform_with_different_states, main]
|
||||
|
||||
env:
|
||||
AWS_REGION: eu-west-2
|
||||
|
||||
jobs:
|
||||
build-and-push-to-ecr-for-lambda-example:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ECR_REPOSITORY: lambda_example
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
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: 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: latest
|
||||
# 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/lambda/lambda_example/docker/Dockerfile .
|
||||
|
||||
# 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
|
||||
|
||||
# permissions:
|
||||
# id-token: write
|
||||
# contents: read
|
||||
|
||||
# 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: 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: latest
|
||||
# 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/lambda/extractor_and_loader/docker/Dockerfile .
|
||||
|
||||
# echo "Pushing Docker image to ECR..."
|
||||
# docker push $IMAGE_URI
|
||||
89
.github/workflows/push_docker_image_to_ecr.yml
vendored
89
.github/workflows/push_docker_image_to_ecr.yml
vendored
|
|
@ -1,89 +0,0 @@
|
|||
name: Build and Push Docker Image to ECR lambda example
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [feature/seperate_terraform_with_different_states, main]
|
||||
|
||||
env:
|
||||
AWS_REGION: eu-west-2
|
||||
|
||||
jobs:
|
||||
build-and-push-to-ecr-for-lambda-example:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ECR_REPOSITORY: lambda_example
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
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: 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: latest
|
||||
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/lambda/lambda_example/docker/Dockerfile .
|
||||
|
||||
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
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
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: 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: latest
|
||||
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/lambda/extractor_and_loader/docker/Dockerfile .
|
||||
|
||||
echo "Pushing Docker image to ECR..."
|
||||
docker push $IMAGE_URI
|
||||
Loading…
Add table
Reference in a new issue