ci(actions): restrict 'pull_request' runs to outer PRs (#1221)

'push' runs will run anyway on commits inside of repository
This commit is contained in:
Alexander Minkin 2025-01-31 19:03:28 +03:00 committed by GitHub
parent 6ec54a379d
commit 8a979fad9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View file

@ -14,6 +14,12 @@ jobs:
runs-on: ubuntu-latest
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
if: >
github.event_name == 'push'
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@ -64,6 +70,12 @@ jobs:
name: Build DB images
runs-on: ubuntu-latest
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
if: >
github.event_name == 'push'
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Set up QEMU

View file

@ -7,6 +7,13 @@ on:
jobs:
lint:
runs-on: ubuntu-20.04
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
if: >
github.event_name == 'push'
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name != github.repository)
permissions:
contents: read
steps: