Skip to content

Commit 97d0fed

Browse files
authored
ci: fix missing permissions to all the repositories (#117)
* ci: fix missing permissions to all the repositories * run workflow * docs * fix
1 parent 69b5f91 commit 97d0fed

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/validate.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Validate Policies
33
on:
44
merge_group:
55
workflow_dispatch:
6+
inputs:
7+
run-e2e-tests:
8+
description: 'Run e2e tests (only from main branch by default)'
9+
required: false
10+
default: false
11+
type: boolean
612
pull_request:
713
branches: [main]
814
push:
@@ -35,15 +41,16 @@ jobs:
3541
uses: actions/create-github-app-token@v2
3642
# Only run e2e tests from the main branch as we need some credentials
3743
# that we don't want to risk leaking from pullrequest opened by random contributors
38-
if: github.ref == 'refs/heads/main'
44+
if: github.ref == 'refs/heads/main' || ${{ inputs.run-e2e-tests }}
3945
with:
4046
app-id: ${{ secrets.ELASTIC_OBSERVABILITY_APP_ID }}
4147
private-key: ${{ secrets.ELASTIC_OBSERVABILITY_APP_PEM }}
48+
owner: ${{ github.repository_owner }}
4249

4350
- name: e2e tests
4451
# Only run e2e tests from the main branch as we need some credentials
4552
# that we don't want to risk leaking from pullrequest opened by random contributors
46-
if: github.ref == 'refs/heads/main'
53+
if: github.ref == 'refs/heads/main' || ${{ inputs.run-e2e-tests }}
4754
run: make e2e-test
4855
env:
4956
GITHUB_TOKEN: ${{ steps.generate_testing_token.outputs.token }}

0 commit comments

Comments
 (0)