Skip to content

Commit 16fb4de

Browse files
Merge pull request #91 from ovcharenko-di/feature/allow-secrets-in-pr-from-forks
Разрешить использовать секреты в PR из форков
2 parents 1642423 + 72798d2 commit 16fb4de

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/pre-testing.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Pre-testing checks
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
run: echo "Success"

.github/workflows/testing.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@
33
# All rights reserved.
44

55
name: Тестирование
6-
# Любой пуш и pr в проекте
7-
on: [push, pull_request]
6+
7+
on:
8+
workflow_run:
9+
workflows: ["Pre-testing checks"]
10+
types:
11+
- completed
12+
13+
permissions:
14+
checks: write
15+
contents: read
816

917
jobs:
1018
test:
19+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1120
runs-on: ${{ matrix.os }}
1221
strategy:
1322
matrix:
@@ -17,6 +26,7 @@ jobs:
1726
os: [windows-latest, ubuntu-22.04]
1827
locale: ['ru_RU']
1928
fail-fast: false
29+
2030
steps:
2131
- name: Установка локали
2232
if: matrix.os == startsWith(matrix.os, 'windows')
@@ -28,6 +38,10 @@ jobs:
2838
2939
- name: Актуализация
3040
uses: actions/[email protected]
41+
with:
42+
fetch-depth: 0
43+
repository: ${{ github.event.workflow_run.head_repository.full_name }}
44+
ref: ${{ github.event.workflow_run.head_sha }}
3145

3246
# Установка OneScript конкретной версии
3347
- name: Установка OneScript

0 commit comments

Comments
 (0)