build(deps-dev): bump prettier from 2.8.1 to 3.3.3 #561
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Image Build | |
concurrency: | |
group: ${{ github.ref }} | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- id: nodeversion | |
run: echo "NODE=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
- name: restore Cache | |
uses: actions/cache@master | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Use Node.js ${{steps.nodeversion.outputs.NODE}} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nodeversion.outputs.NODE }} | |
- name: install | |
run: yarn | |
- name: lint | |
run: yarn lint | |
- name: Configure AWS credentials | |
if: github.ref == 'refs/heads/main' | |
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: us-east-2 | |
- name: Build Docker Image | |
run: | | |
docker build \ | |
--platform linux/amd64 \ | |
--build-arg GIT_REV=${{ github.sha }} \ | |
-t lambda_wishlist:latest . | |
- name: Push to ECR | |
if: github.ref == 'refs/heads/main' | |
run: | | |
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin 988455245074.dkr.ecr.us-east-2.amazonaws.com | |
docker tag lambda_wishlist:latest 988455245074.dkr.ecr.us-east-2.amazonaws.com/lambda_wishlist:latest | |
docker push 988455245074.dkr.ecr.us-east-2.amazonaws.com/lambda_wishlist:latest | |
- name: Deploy Lambda function | |
if: github.ref == 'refs/heads/main' | |
run: | | |
aws lambda update-function-code \ | |
--function-name wishlist \ | |
--image-uri 988455245074.dkr.ecr.us-east-2.amazonaws.com/lambda_wishlist:latest \ | |
--publish |