Skip to content

Commit

Permalink
optional full-scan
Browse files Browse the repository at this point in the history
  • Loading branch information
afuller-TT committed Dec 11, 2024
1 parent bcb81ce commit 0cd41ce
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ on:
required: false
type: string
default: "ubuntu-22.04-amd64"
full-scan:
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
os:
required: false
type: string
default: "ubuntu-22.04-amd64"
full-scan:
required: false
type: boolean
default: false

jobs:
build-docker-image:
Expand Down Expand Up @@ -68,15 +76,15 @@ jobs:
clean: true

- name: Determine merge base
if: github.ref_name != 'main'
if: github.ref_name != 'main' && inputs.full-scan != 'true'
run: |
echo "Current branch: ${{ github.ref_name }}"
MERGE_BASE=$(git merge-base ${{ github.ref_name }} origin/main)
echo "Merge base between ${{ github.ref_name }} and main: $MERGE_BASE"
echo "MERGE_BASE=$MERGE_BASE" >> $GITHUB_ENV
- name: Check out baseline
if: github.ref_name != 'main'
if: github.ref_name != 'main' && inputs.full-scan != 'true'
uses: actions/checkout@v4
with:
ref: ${{ env.MERGE_BASE }}
Expand All @@ -85,7 +93,7 @@ jobs:
clean: true

- name: Create baseline
if: github.ref_name != 'main'
if: github.ref_name != 'main' && inputs.full-scan != 'true'
uses: addnab/docker-run-action@v3
with:
image: ${{ env.TT_METAL_DOCKER_IMAGE_TAG }}
Expand Down

0 comments on commit 0cd41ce

Please sign in to comment.