Skip to content

Commit

Permalink
Merge pull request #732 from iron-fish/rahul/change-index-job-to-run-…
Browse files Browse the repository at this point in the history
…on-push

Change workflow trigger to run after PR merge
  • Loading branch information
patnir authored Oct 15, 2024
2 parents 3c6af2a + c28bce1 commit 15221c4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/update-search-index.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Update Search Index

on:
pull_request:
push:
branches:
- master

Expand Down Expand Up @@ -31,13 +31,21 @@ jobs:
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Skip Duplicate Actions
id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'

- name: Extract Branch Name
id: extract_branch
shell: bash
run: |
echo "::set-output name=branch::${{ github.head_ref }}"
- name: Commit and Push Search Index Updates
if: steps.skip_check.outputs.should_skip != 'true' # Only run if not skipped
run: |
git add -A
git commit -m "Update search index" || echo "No changes to commit"
Expand Down

0 comments on commit 15221c4

Please sign in to comment.