Skip to content

Feature/update start.sh.v2 (#8) #13

Feature/update start.sh.v2 (#8)

Feature/update start.sh.v2 (#8) #13

Workflow file for this run

name: Deploy to the production
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::423238210111:role/github-cicd-deploymennt
aws-region: ap-southeast-2
- name: Login to Amazon ECR Private
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Load secrets and save to .env
run: aws secretsmanager get-secret-value --secret-id simple_bank_secret --query SecretString --output text | jq -r 'to_entries|map("\(.key)=\(.value)")|.[]' > app.env
- name: Debug: Check app.env content

Check failure on line 32 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
run: cat app.env
- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: simple_bank
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG