Update dependency xunit.runner.console to v2.7.0 #738
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: 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 | |