Yas Apply saga for payment process #444
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: storefront service ci | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- "storefront/**" | |
- ".github/workflows/actions/action.yaml" | |
- ".github/workflows/storefront-ci.yaml" | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- "storefront/**" | |
- ".github/workflows/actions/action.yaml" | |
- ".github/workflows/storefront-ci.yaml" | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm ci | |
working-directory: storefront | |
- run: npm run build | |
working-directory: storefront | |
- run: npm run lint | |
working-directory: storefront | |
- run: npx prettier --check . | |
working-directory: storefront | |
- name: SonarCloud Scan | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.ref == 'refs/heads/main' }} | |
uses: SonarSource/sonarcloud-github-action@master | |
with: | |
projectBaseDir: storefront | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Log in to the Container registry | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker images | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./storefront | |
push: true | |
tags: ghcr.io/nashtech-garage/yas-storefront:latest |