Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tejadf authored Dec 19, 2023
1 parent c051704 commit f23ddf2
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/dfscan.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: dfctl-scan
on:
pull_request:
inputs:
branches: [main]
workflow_dispatch:
inputs:
dfctlversion:
description: 'dfctl version to use'
required: true
default: '3.4.0-2468'
types: [review_requested]
pull_request:
branches: [fix-netcat]
types: [review_requested]
jobs:
Build:
runs-on: self-hosted
Expand All @@ -22,13 +23,14 @@ jobs:
- name: scan filesystem with dfctl
env:
DFCTL_VERSION: "${{ github.event.inputs.dfctlversion }}"
DFCTL_VERSION: ${{ github.event.inputs.dfctlversion || 'default_version' }}
DF_RUN_TOKEN: ${{ secrets.DFSCAN_TOKEN }}
# The short ref name of the branch that triggered the workflow run
repoVersion: $GITHUB_REF_NAME
# Source branch of the PR in a workflow run
repoVersion: $GITHUB_HEAD_REF
APP_NAME: ${{ github.event.repository.name }}
COMP_NAME: $GITHUB_BASE_REF
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

0 comments on commit f23ddf2

Please sign in to comment.