Skip to content

Commit 138c096

Browse files
authored
fix(ci): only run get-vault-secrets ci from grafana PRs (#472)
The `get-vault-secrets` action only works when run from a `grafana` repository, so skip this test if the PR is from a different repository. We will still get a run of this workflow for the change before merging, as we use merge queues.
1 parent 27eee7b commit 138c096

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/test-get-vault-secrets.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
paths:
1313
- "actions/get-vault-secrets/**"
1414
- ".github/workflows/test-get-vault-secrets.yaml"
15+
1516
merge_group:
1617

1718
permissions:
@@ -28,6 +29,12 @@ jobs:
2829
- invalid
2930
runs-on: ubuntu-latest
3031

32+
# The `get-vault-secrets` action only works when run from a `grafana`
33+
# repository, so skip this test if the PR is from a different repository. We
34+
# will still get a run of this workflow for the change before merging, as we
35+
# use merge queues.
36+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == 'grafana'
37+
3138
steps:
3239
- name: Checkout code
3340
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

0 commit comments

Comments
 (0)