Skip to content

Merge branch 'main' of https://github.com/Luxshan2000/aws-pipeline #5

Merge branch 'main' of https://github.com/Luxshan2000/aws-pipeline

Merge branch 'main' of https://github.com/Luxshan2000/aws-pipeline #5

Workflow file for this run

name: CICD
on:
push:
branches: [main]
jobs:
build-frontend:
runs-on: self-hosted
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build docker image
run: docker build -t luxshan/aws-pipeline ./frontend
- name: Publish image to docker hub
run: docker push luxshan/aws-pipeline:latest
deploy:
needs: build

Check failure on line 24 in .github/workflows/workflow.yml

View workflow run for this annotation

GitHub Actions / CICD

Invalid workflow file

The workflow is not valid. .github/workflows/workflow.yml (Line: 24, Col: 12): Job 'deploy' depends on unknown job 'build'.

Check failure on line 24 in .github/workflows/workflow.yml

View workflow run for this annotation

GitHub Actions / CICD

Invalid workflow file

The workflow is not valid. .github/workflows/workflow.yml (Line: 24, Col: 12): Job 'deploy' depends on unknown job 'build'.
runs-on: [aws-ec2]
steps:
- name: Pull image from docker hub
run: docker pull luxshan/aws-pipeline
- name: Delete old container
run: docker rm -f aws-pipeline-container
- name: Run docker container
run: docker run -d -p 3000:3000 --name aws-pipeline-container luxshan/aws-pipeline