diff --git a/.github/actions/common/code-style/action.yml b/.github/actions/common/code-style/action.yml index 89f39e92..93e6b55a 100644 --- a/.github/actions/common/code-style/action.yml +++ b/.github/actions/common/code-style/action.yml @@ -31,8 +31,8 @@ runs: env: target_dir: ${{ inputs.target_dir }} run: | - chmod +x .github/actions/common/code-style/entrypoint.sh - ./.github/actions/common/code-style/entrypoint.sh "${target_dir}" || echo "STYLE_ISSUES=true" >> $GITHUB_OUTPUT + chmod +x ${target_dir}/.github/actions/common/code-style/entrypoint.sh + ${target_dir}/.github/actions/common/code-style/entrypoint.sh "${target_dir}" || echo "STYLE_ISSUES=true" >> $GITHUB_OUTPUT shell: bash - name: Analyze code style results diff --git a/.github/workflows/dls-pr-workflow.yaml b/.github/workflows/dls-pr-workflow.yaml index 143cfbfb..7b717b44 100644 --- a/.github/workflows/dls-pr-workflow.yaml +++ b/.github/workflows/dls-pr-workflow.yaml @@ -53,17 +53,24 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 with: persist-credentials: false + path: dlstreamer-repo - name: Remove thirdparty folder - run: rm -rf thirdparty + run: | + rm -rf dlstreamer-repo/thirdparty + rm -rf thirdparty - name: Code-style action - uses: ./.github/actions/common/code-style + uses: ./dlstreamer-repo/.github/actions/common/code-style with: - target_dir: "." + target_dir: "dlstreamer-repo" name: 'DLS_code-style-check-report' fail-on-findings: true + - name: Clean up + run: | + sudo rm -rf dlstreamer-repo + dls-check-license-headers: permissions: contents: read @@ -75,14 +82,19 @@ jobs: with: persist-credentials: false fetch-depth: 0 + path: dlstreamer-repo - name: Check license headers - uses: ./.github/actions/common/license-namespace-checker + uses: ./dlstreamer-repo/.github/actions/common/license-namespace-checker with: name: 'DLS_license-check-report' - path: '.' + path: 'dlstreamer-repo' fail-on-findings: true + - name: Clean up + run: | + sudo rm -rf dlstreamer-repo + # dls-static-code-analysis: # permissions: # security-events: write @@ -90,7 +102,7 @@ jobs: # contents: read # packages: read # name: "DLS SCAN: static code analysis" - # uses: ./.github/workflows/codeql.yaml + # uses: dlstreamer-repo/.github/workflows/codeql.yaml dls-static-code-analysis-for-c-cpp: permissions: @@ -118,15 +130,18 @@ jobs: with: persist-credentials: false fetch-depth: 0 + path: dlstreamer-repo - name: Fetch main branch for comparison run: | + cd dlstreamer-repo git fetch origin master - name: Detect changes in docker directory id: check run: | echo "🔍 Checking for changes in 'docker/'..." + cd dlstreamer-repo CHANGED_FILES=$(git diff --name-only origin/master...HEAD -- 'docker/') if [ -n "${CHANGED_FILES}" ]; then @@ -139,6 +154,10 @@ jobs: echo "docker_changed=false" >> "$GITHUB_OUTPUT" fi + - name: Clean up + run: | + sudo rm -rf dlstreamer-repo + dls-trivy-config-scan: permissions: contents: read @@ -182,25 +201,26 @@ jobs: matrix: include: - name: dlstreamer_ubuntu22 - dockerfile: docker/ubuntu/ubuntu22.Dockerfile + dockerfile: dlstreamer-repo/docker/ubuntu/ubuntu22.Dockerfile output-file: hadolint-dlstreamer_ubuntu22.json - name: dlstreamer_ubuntu24 - dockerfile: docker/ubuntu/ubuntu24.Dockerfile + dockerfile: dlstreamer-repo/docker/ubuntu/ubuntu24.Dockerfile output-file: hadolint-dlstreamer_ubuntu24.json - name: dlstreamer_fedora41 - dockerfile: docker/fedora41/fedora41.Dockerfile + dockerfile: dlstreamer-repo/docker/fedora41/fedora41.Dockerfile output-file: hadolint-dlstreamer_fedora41.json - name: dlstreamer-testing-ubuntu - dockerfile: docker/ubuntu/ubuntu-testing.Dockerfile + dockerfile: dlstreamer-repo/docker/ubuntu/ubuntu-testing.Dockerfile output-file: hadolint-dlstreamer-testing-ubuntu.json steps: - name: Check out dlstreamer repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 with: persist-credentials: false + path: dlstreamer-repo - name: Run Hadolint Action - uses: ./.github/actions/common/hadolint + uses: ./dlstreamer-repo/.github/actions/common/hadolint with: dockerfile: ${{ matrix.dockerfile }} output-file: ${{ matrix.output-file }} @@ -209,6 +229,10 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} fail-on-findings: true + - name: Clean up + run: | + sudo rm -rf dlstreamer-repo + dls-pylint: permissions: contents: read @@ -232,6 +256,10 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} fail-on-findings: true + - name: Clean up + run: | + sudo rm -rf dlstreamer-repo + dls-shellcheck: permissions: contents: read diff --git a/.github/workflows/dls-weekly-cached-images.yaml b/.github/workflows/dls-weekly-cached-images.yaml index f1c1c13c..3c51a19e 100644 --- a/.github/workflows/dls-weekly-cached-images.yaml +++ b/.github/workflows/dls-weekly-cached-images.yaml @@ -294,6 +294,7 @@ jobs: dev_debug_img: ghcr.io/${{ github.repository }}/intel/edge-ai-dlstreamer@${{ steps.digest.outputs.digest }} run: | cosign sign --yes ${dev_debug_img} + - name: Clean up if: always() env: