Skip to content

Commit

Permalink
Debug new workflow to check files
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 16, 2024
1 parent 093fdf4 commit e5b17c1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/check_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,22 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Define base and head refs
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: |
echo "Base ref: ${BASE_REF}"
echo "Head ref: ${HEAD_REF}"
- name: Add main repository as remote
run: |
git remote add main https://github.com/ECP-WarpX/WarpX.git
- name: Fetch base branch from main repository
run: |
git fetch main ${BASE_REF}
- name: Get changed files
run: |
git diff --name-only --diff-filter=ACMRTUXB ${GITHUB_BASE_REF}..${GITHUB_HEAD_REF} > check_diff.txt
git diff --name-only --diff-filter=ACMRTUXB main/${BASE_REF}..${HEAD_REF} > check_diff.txt
- name: Check changed files
run: |
if grep -v -E "^(docs|\.github)/" check_diff.txt; then
Expand All @@ -26,4 +39,4 @@ jobs:
echo "skip=true" >> ${GITHUB_OUTPUT}
fi
outputs:
skip: ${{ steps.check.outputs.skip_workflows }}
skip: ${{ steps.check.outputs.skip }}

0 comments on commit e5b17c1

Please sign in to comment.