🐛 Fix: Update CI/CD #24
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: Docker Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Unit Tests | |
run: | | |
echo "Running Unit Tests" | |
yarn install | |
yar run test | |
echo "Unit Tests Completed" | |
build: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build & Push Image | |
run: | | |
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{secrets.DOCKERHUB_USERNAME}}" --password-stdin | |
docker image build . -t amirzenoozi/lps-react-app:latest | |
docker push amirzenoozi/lps-react-app:latest |