forked from realworld-apps/angular-realworld-example-app
-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathdeploy-frontend-whitesource.yml
More file actions
67 lines (59 loc) · 2.06 KB
/
deploy-frontend-whitesource.yml
File metadata and controls
67 lines (59 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
on:
push:
branches:
- '*'
workflow_dispatch:
jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: npm install, build, and test
run: |
# Build and test the project, then
# deploy to Azure Web App.
npm install
npm run build --if-present
#npm run test --if-present
- name: WhiteSource Unified Agent Scan
env:
WS_APIKEY: ${{secrets.APIKEY}}
WS_USERKEY: ${{secrets.USERKEY}}
WS_WSS_URL: https://app.whitesourcesoftware.com/agent
WS_PRODUCTNAME: ${{github.event.repository.name}}
WS_PROJECTNAME: ${{github.ref}}
WS_FILESYSTEMSCAN: false
WS_GENERATEPROJECTDETAILSJSON: true
WS_UPDATEINVENTORY: true #(defaults to true)
WS_enableImpactAnalysis: true
WS_resolveAllDependencies: false
run: |
sudo apt-get install jq curl
echo Downloading WhiteSource Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting WhiteSource Scan
java -jar wss-unified-agent.jar
fi
- name: Archive Whitesource results
uses: actions/upload-artifact@v3
with:
name: Whitesource reports
path: ./whitesource
# - name: 'Deploy to Azure Web App'
# id: deploy-to-webapp
# uses: azure/webapps-deploy@v2
# with:
# app-name: angular-essentials-demo
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# package: dist/