Skip to content

Update threading logic to make it thread safe. Update the dataframe f… #2

Update threading logic to make it thread safe. Update the dataframe f…

Update threading logic to make it thread safe. Update the dataframe f… #2

Workflow file for this run

name: Deploy to AWS Lambda from ECR
on:
push:
branches:
- main # Triggers on pushes to the main branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Amazon ECR
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin ${{ secrets.ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com
# - name: Run Unit Tests
# run: |
# docker build --target test -t your-image:test .
# docker run your-image:test # Run unit tests
- name: Build and Tag Docker Image
run: |
docker buildx build --platform linux/amd64 -t ${{ secrets.ACCOUNT_ID }}.dkr.ecr.eu-north-1.amazonaws.com/indeed-scraper:latest --push --provenance=false .
- name: Update Lambda to Use New Image
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws lambda update-function-code --function-name indeed-scraper \
--image-uri ${{ secrets.ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/indeed-scraper:latest