Skip to content

Update dependency Microsoft.VisualStudio.Azure.Containers.Tools.Targets to v1.21.0 #747

Update dependency Microsoft.VisualStudio.Azure.Containers.Tools.Targets to v1.21.0

Update dependency Microsoft.VisualStudio.Azure.Containers.Tools.Targets to v1.21.0 #747

Workflow file for this run

name: Whitesource Unified Agent Scan - .NET (dotnet)
on: [push, pull_request, workflow_dispatch]
jobs:
build:
env:
WS_ProductionBranches: "main,release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
include-prerelease: true
- name: Build with dotnet
run: dotnet build ./eShopOnWeb.sln --configuration Release
- name: Set Environment Var for Branch
run: echo PROJECT_TO_TEST=","${GITHUB_REF_NAME}"," >> $GITHUB_ENV
- name: Reformat Environment Variable
run: echo WS_ProductionBranches=","$WS_ProductionBranches"," >> $GITHUB_ENV
- name: Set Org API Key if branch is marked as production
if: contains(env.WS_ProductionBranches, env.PROJECT_TO_TEST)
run: |
echo WS_APIKEY=${{secrets.APIKEY}} >> $GITHUB_ENV
echo WS_USERKEY=${{secrets.USERKEY}} >> $GITHUB_ENV
- name: Set Org API Key if branch is non-production
if: contains(env.WS_ProductionBranches, env.PROJECT_TO_TEST) == false
run: |
echo WS_APIKEY=${{secrets.DEVAPIKEY}} >> $GITHUB_ENV
echo WS_USERKEY=${{secrets.DEVUSERKEY}} >> $GITHUB_ENV
- name: WhiteSource Unified Agent Scan
env:
WS_WSS_URL: https://saas.whitesourcesoftware.com/agent
WS_PRODUCTNAME: ${{github.event.repository.name}}
WS_PROJECTNAME: ${{github.ref}}
WS_FILESYSTEMSCAN: false
GH_BRANCH: ${{ github.head_ref }}
run: |
echo "WSAPIKEY"$WS_APIKEY
echo "WS_USERKEY"$WS_USERKEY
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