Skip to content

Merge pull request #3 from rahulpandey70:ci-cd #1

Merge pull request #3 from rahulpandey70:ci-cd

Merge pull request #3 from rahulpandey70:ci-cd #1

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [master]
env: PORT:${{secrets.PORT}}
MONGODB_URL:${{secrets.MONGODB_URL}}
NODE_ENV:${{secrets.NODE_ENV}}
ACCESS_TOKEN_SECRET:${{secrets.ACCESS_TOKEN_SECRET}}
REFRESH_TOKEN_SECRET:${{secrets.REFRESH_TOKEN_SECRET}}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install
working-directory: ./frontend
run: |
npm install
- name: Install
working-directory: .
run: |
npm install
export PORT=$PORT
export MONGODB_URL=$MONGODB_URL
export NODE_ENV=$NODE_ENV
export ACCESS_TOKEN_SECRET=$ACCESS_TOKEN_SECRET
export REFRESH_TOKEN_SECRET=$REFRESH_TOKEN_SECRET
- name: Build Client Docker Image
working-directory: ./frontend
run: docker build -t rahulpandey9103/social-media-app:frontend-${{github.run_number}} .
- name: Build Server Docker Image
working-directory: .
run: docker build -t rahulpandey9103/social-media-app:server-${{github.run_number}} .
- name: Login to Docker Hub
uses: docker/login-actions@v3
with: username:${{serects.DOCKER_USERNAME}}

Check failure on line 45 in .github/workflows/pipeline.yml

View workflow run for this annotation

GitHub Actions / Build and Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/pipeline.yml (Line: 45, Col: 15): Unrecognized named-value: 'serects'. Located at position 1 within expression: serects.DOCKER_USERNAME .github/workflows/pipeline.yml (Line: 45, Col: 15): Unexpected value 'username:${{serects.DOCKER_USERNAME}} password:${{secrets.DOCKER_PASSWORD}}'
password:${{secrets.DOCKER_PASSWORD}}
- name: Push the docker images to Docker Hub
run: |
docker push rahulpandey9103/social-media-app:frontend-${{github.run_number}}
docker push rahulpandey9103/social-media-app:server-${{github.run_number}}