Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Hweinstock committed Nov 11, 2024
1 parent b92c634 commit b1b6f17
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/copyPasteDetection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ jobs:
run: echo "IS_LOCAL=false" >> $GITHUB_ENV

- name: Fetch fork upstream
if: env.IS_LOCAL == false
if: ${{ env.IS_LOCAL == 'false' }}
run: |
git remote add forkUpstream https://github.com/${{ github.event.pull_request.head.repo.full_name }} # URL of the fork
git fetch forkUpstream # Fetch fork
- name: Determine base and target branches for comparison.
if: env.IS_LOCAL == false
if: ${{ env.IS_LOCAL == 'false' }}
run: |
echo "CURRENT_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: Determine base and target branches for comparison
if: env.IS_LOCAL
if: e${{ env.IS_LOCAL == 'true' }}
run: |
echo "CURRENT_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
echo "TARGET_BRANCH=master" >> $GITHUB_ENV
Expand All @@ -52,17 +52,17 @@ jobs:
echo "CURRENT_BRANCH=$CURRENT_BRANCH"
echo "TARGET_BRANCH=$TARGET_BRANCH"
- if: env.IS_LOCAL == false
- if: ${{ env.IS_LOCAL == 'false' }}
run: git diff origin/$TARGET_BRANCH forkUpstream/$CURRENT_BRANCH > diff_output.txt

- if: env.IS_LOCAL
- if: ${{ env.IS_LOCAL == 'true' }}
run: git diff origin/$TARGET_BRANCH $CURRENT_BRANCH > diff_output.txt

- run: npm install -g jscpd

- run: jscpd --config "$GITHUB_WORKSPACE/.github/workflows/jscpd.json"

- if: always() && env.IS_LOCAL == false
- if: ${{ env.IS_LOCAL == 'false' }}
uses: actions/upload-artifact@v4
with:
name: unfiltered-jscpd-report
Expand Down

0 comments on commit b1b6f17

Please sign in to comment.