Minor bugs #156
Workflow file for this run
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: Open Commercial CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build-analyze-deploy: | |
name: Build, analyze, dockerize, and publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 16.13 | |
- name: Build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
ENV_NAME: production | |
run: | | |
npm install | |
npm run build | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Set up QEMU | |
if: ${{ github.ref_name == 'master' }} | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: ${{ github.ref_name == 'master' }} | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
if: ${{ github.ref_name == 'master' }} | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker image | |
if: ${{ github.ref_name == 'master' }} | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: opencommercial/ops-web:latest |