Skip to content

Commit

Permalink
Run permissions step on pull_request_target but not push (#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Nov 30, 2023
1 parent cd3f08b commit e9b5855
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-integration-aws_lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false
- name: permissions
- name: Check permissions on PR
if: github.event_name == 'pull_request_target'
run: |
python3 -uS .github/workflows/scripts/trigger_tests_on_label.py \
--repo-id ${{ github.event.repository.id }} \
Expand All @@ -45,6 +46,9 @@ jobs:
# these can contain special characters
ARG_USERNAME: ${{ github.event.pull_request.user.login }}
ARG_LABEL_NAMES: ${{ toJSON(github.event.pull_request.labels.*.name) }}
- name: Check permissions on repo branch
if: github.event_name == 'push'
run: true
test-pinned:
needs: check-permissions
timeout-minutes: 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
with:
persist-credentials: false

- name: permissions
- name: Check permissions on PR
if: github.event_name == 'pull_request_target'
run: |
{% raw %}
python3 -uS .github/workflows/scripts/trigger_tests_on_label.py \
Expand All @@ -23,3 +24,7 @@
ARG_USERNAME: ${{ github.event.pull_request.user.login }}
ARG_LABEL_NAMES: ${{ toJSON(github.event.pull_request.labels.*.name) }}
{% endraw %}

- name: Check permissions on repo branch
if: github.event_name == 'push'
run: true

0 comments on commit e9b5855

Please sign in to comment.