Update build.yml #50
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: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
- name: NPM Install | |
run: npm install | |
- name: Docker build and push | |
run: | | |
# Run commands to build and push Docker images | |
docker build -t swiggy-clone . | |
docker tag swiggy-clone aakibkhan1212/swiggy-clone:latest | |
docker login -u ${{ secrets.Dockerhub_username }} -p ${{ secrets.Dockerhub_token }} | |
docker push aakibkhan1212/swiggy-clone:latest | |
env: | |
DOCKER_CLI_ACI: 1 |