Skip to content

Commit

Permalink
github action fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Jul 14, 2024
1 parent 81acd57 commit 5815f66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-drc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
else
if [ "${{ github.event_name }}" = "pull_request" ]; then
# triggered on pull request, get all changed / added files from forked repo
export FILES=$(git diff --name-only --diff-filter=ACM FETCH_HEAD | grep -E '\.(gds|oas)$' | sed 's|^submissions/||')
export FILES=$(git diff --name-only --diff-filter=ACM origin/main...HEAD | grep -E '\.(gds|oas)$' | sed 's|^submissions/||')
else
# triggered push, locate the changed / added .gds and .oas files in the submission folder
export FILES=$(git diff --name-status --diff-filter=ACM --relative=submissions ${{ github.event.before }} ${{ github.sha }} submissions | grep -E '\.(gds|oas)$' | awk '{print $2}')
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/run-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
fetch-depth: 0


- name: get changed files
uses: jitterbit/get-changed-files@v1
#- name: get changed files
# uses: jitterbit/get-changed-files@v1

- name: get changed files, list
run: |
for changed_file in ${{ steps.files.outputs.all }}; do
echo "Do something with this ${changed_file}."
done
#- name: get changed files, list
# run: |
# for changed_file in ${{ steps.files.outputs.all }}; do
# echo "Do something with this ${changed_file}."
# done


- name: write what triggered this workflow to a txt file
Expand Down Expand Up @@ -79,13 +79,11 @@ jobs:
else
if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "pull_request_target" ]]; then
# triggered on pull request, get all changed / added files from forked repo
FILES=$(git diff --name-only --diff-filter=ACM $BASE_BRANCH...$PR_BRANCH | grep -i -E '\.(gds|oas)$' | sed 's|^submissions/||')
#FILES=$(git diff --name-only --diff-filter=ACM origin/$BASE_BRANCH...origin/$PR_BRANCH | grep -i -E '\.(gds|oas)$' | sed 's|^submissions/||')
FILES=$(git diff --name-only --diff-filter=ACM origin/main...HEAD | grep -i -E '\.(gds|oas)$' | sed 's|^submissions/||')
#FILES=$(git diff --name-only --diff-filter=ACM FETCH_HEAD | grep -i -E '\.(gds|oas)$' | sed 's|^submissions/||')
else
# triggered push, locate the changed / added .gds and .oas files in the submission folder
FILES=$(git diff --name-only --diff-filter=ACM --relative=submissions $BASE_BRANCH...$PR_BRANCH submissions | grep -i -E '\.(gds|oas)$' | awk '{print $2}')
#FILES=$(git diff --name-status --diff-filter=ACM --relative=submissions ${{ github.event.before }} ${{ github.sha }} submissions | grep -i -E '\.(gds|oas)$' | awk '{print $2}')
FILES=$(git diff --name-status --diff-filter=ACM --relative=submissions ${{ github.event.before }} ${{ github.sha }} submissions | grep -i -E '\.(gds|oas)$' | awk '{print $2}')
fi
fi
Expand Down

0 comments on commit 5815f66

Please sign in to comment.