diff --git a/.github/workflows/vulnerability-comparison.yaml b/.github/workflows/vulnerability-comparison.yaml index 621a6f2f..e1eba003 100644 --- a/.github/workflows/vulnerability-comparison.yaml +++ b/.github/workflows/vulnerability-comparison.yaml @@ -11,6 +11,7 @@ env: jobs: vulnerability-comparison: + if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest permissions: pull-requests: write @@ -21,7 +22,7 @@ jobs: ref: ${{ env.SHA }} - name: Set short SHA id: vars - run: echo "SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV + run: echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push Docker image