Skip to content

Commit

Permalink
Create userprofile.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayjadhav7 authored Sep 16, 2021
1 parent 2c8723b commit c45c3d6
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/userprofile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: UserProfile API
on:
push:
branches:
- feature_*
paths:
- apis/userprofile/**
- .github/**
pull_request:
branches:
- develop
paths:
- apis/userprofile/**
jobs:
Build_USERPROFILE_API:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup JS
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Test with the JS
run: npm ci
working-directory: apis/userprofile
- if: ${{ failure() }}
uses: actions/github-script@v4
with:
script: |
let body = "${{ env.build_name }} Worflow Failure \n Build Number: ${{ github.run_number }} \n Build Log: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} \n SHA: [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) \n";
github.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Error in build',
body: body
})
- name: Push to Azure
uses: azure/docker-login@v1
with:
login-server: 'openhackfho408g7acr.azurecr.io'
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- run: |
docker build . -t openhackfho408g7acr.azurecr.io/devopsoh/api-userprofile:${{github.run_number}}
docker push openhackfho408g7acr.azurecr.io/devopsoh/api-userprofile:${{github.run_number}}

0 comments on commit c45c3d6

Please sign in to comment.