Skip to content

Commit

Permalink
Revert "chore(ci): allow accepting runs from a fork"
Browse files Browse the repository at this point in the history
  • Loading branch information
zied-elouaer authored May 6, 2024
1 parent 7d0ac9a commit 8a2e68c
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ on:
push:
branches:
- main
- master
pull_request:
types: [opened, synchronize]
pull_request_target:
types: [opened, synchronize]

concurrency:
group: terraform-google-artifact-registry-repository
Expand Down Expand Up @@ -76,30 +74,12 @@ jobs:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@956b2e73cdfe3bcb819bb7225e490cb3b18fd76e # v2.2.1
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
- name: Checkout
# for security reasons we pin commit ids and not tags.
# actions/[email protected] -> 2541b1294d2704b0964813337f33b291d3f8596b
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

# - name: Setup SSH to Private Modules
# # for security reasons we pin commit ids and not tags.
Expand Down

0 comments on commit 8a2e68c

Please sign in to comment.