Skip to content

update workflow

update workflow #5

Workflow file for this run

name: dfctl-scan
on:
workflow_dispatch:
inputs:
dfctlversion:
description: 'dfctl version to use'
required: true
default: '3.4.0-2468'
pull_request:
branches: [fix-netcat]
types: [review_requested]
jobs:
Build:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: scan filesystem with dfctl
env:
DFCTL_VERSION: ${{ github.event.inputs.dfctlversion || 'default_version' }}
DF_RUN_TOKEN: ${{ secrets.DFSCAN_TOKEN }}
APP_NAME: ${{ github.event.repository.name }}
COMP_NAME: ${{ github.base_ref }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
repoVersion=${{ github.head_ref }}
else
repoVersion=${{ github.ref_name }}
fi
docker run --rm -e DF_RUN_TOKEN=$DF_RUN_TOKEN -v /var/run/docker.sock:/var/run/docker.sock dockerrepo.corp.deepfactor.io:8443/df/runtime:$DFCTL_VERSION dfctl scan -s fs -a $APP_NAME -c $APP_NAME -V $repoVersion $GITHUB_WORKSPACE