Skip to content

Commit

Permalink
fix workflow forks (#187)
Browse files Browse the repository at this point in the history
* checkout pr head

* test commit

* Revert "test commit"

This reverts commit 3119f6b.
  • Loading branch information
MaggieCabrera authored May 21, 2024
1 parent 8ebac36 commit 96fd5c9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/preview-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ jobs:
check-for-changes-to-themes:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout PR Head
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Retrieved Theme Changes
id: check-for-changes
run: |
# Retrieve list of all changed files
git fetch origin trunk:trunk
changed_files=$(git diff --name-only HEAD origin/trunk)
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
changed_files=$(git diff --name-only HEAD origin/${{ github.event.pull_request.base.ref }})
# Loop through changed files and identify parent directories
declare -A unique_dirs
Expand Down

0 comments on commit 96fd5c9

Please sign in to comment.