Skip to content

Commit

Permalink
[CI] Fix LauchDarkly References Action triggering on forks (elastic#1…
Browse files Browse the repository at this point in the history
…89232)

## Summary

This action is triggering on pushes to `main` on forks as well, this PR
skips the action on forks. The action will fail on the fork and notify
the developer.

### Testing
Failure on my fork's `main` before this PR
https://github.com/Ikuni17/kibana/actions/runs/10100674569

Tested with this branch in my fork and it skipped properly
96e2ed6
https://github.com/Ikuni17/kibana/actions/runs/10101514673

Flipped the flag to ensure it's working
2a586cc
https://github.com/Ikuni17/kibana/actions/runs/10101534520
  • Loading branch information
Ikuni17 authored Jul 26, 2024
1 parent 7db2868 commit 73cb20d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/launchdarkly-code-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ concurrency:
jobs:
launchDarklyCodeReferences:
name: LaunchDarkly Code References
if: github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions
- name: LaunchDarkly Code References
uses: launchdarkly/find-code-references@v2.12.0
with:
accessToken: ${{ secrets.LD_ACCESS_TOKEN }}
projKey: ${{ secrets.LD_PROJECT_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions
- name: LaunchDarkly Code References
uses: launchdarkly/find-code-references@v2.12.0
with:
accessToken: ${{ secrets.LD_ACCESS_TOKEN }}
projKey: ${{ secrets.LD_PROJECT_KEY }}

0 comments on commit 73cb20d

Please sign in to comment.