Skip to content

Rename main.yml.bak to main.yml #1

Rename main.yml.bak to main.yml

Rename main.yml.bak to main.yml #1

Workflow file for this run

name: Build and Publish Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Build Nuxt project
run: |
npm i
npx prisma generate
npm run build
- name: configure aws credentials
uses: aws-actions/[email protected]
with:
role-to-assume: arn:aws:iam::654654236858:role/GithubActions
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-west-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a
- name: Build and Push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry}}
IMAGE_TAG: ${{ github.sha}}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/ud-repo:$IMAGE_TAG .
docker push $ECR_REGISTRY/ud-repo:$IMAGE_TAG
echo "image=$ECR_REGISTRY/ud-repo:$IMAGE_TAG" >> $GITHUB_OUTPUT