-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11e8870
commit fca93cf
Showing
1 changed file
with
46 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
name: Handle Private PR Notification | ||
|
||
on: | ||
repository_dispatch: | ||
types: [new-private-pr] | ||
|
||
env: | ||
BSC_DATABASESECRET: secrets.BSC_DATABASESECRET | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
prepare_and_trigger_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# (Might not need this step if only directories present in private are these directories) | ||
- name: Check Changed Directories | ||
id: check_changes | ||
run: | | ||
changed_directories="${{ github.event.client_payload.changed_dirs }}" | ||
echo "Changed directories: $changed_directories" | ||
changes_in_models_or_benchmarks="false" | ||
if [[ $changed_directories == *"/models"* || $changed_directories == *"/benchmarks"* ]]; then | ||
changes_in_models_or_benchmarks="true" | ||
fi | ||
echo "changes_in_models_or_benchmarks=$changes_in_models_or_benchmarks" >> $GITHUB_ENV | ||
# Checkout public repository | ||
- name: Checkout Public Repository Code | ||
uses: actions/checkout@v4 | ||
|
||
# Checkout private repository | ||
- name: Checkout Private Repository Code | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'brains-score/vision_private' | ||
token: ${{ secrets.PRIVATE_REPO_ACCESS_TOKEN }} | ||
path: 'private-repo' | ||
|
||
# Move files from private repo to public repo | ||
- name: Move Files from Private to Public Repository | ||
if: env.changes_in_models_or_benchmarks == 'true' | ||
run: | | ||
mv private-repo/benchmarks/* vision/benchmarks/ | ||
mv private-repo/models/* vision/models/ | ||
mv private-repo/datasets/* vision/datasets/ | ||
# name: Handle Private PR Notification | ||
|
||
# on: | ||
# repository_dispatch: | ||
# types: [new-private-pr] | ||
|
||
# env: | ||
# BSC_DATABASESECRET: secrets.BSC_DATABASESECRET | ||
|
||
# permissions: write-all | ||
|
||
# jobs: | ||
# prepare_and_trigger_tests: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# # (Might not need this step if only directories present in private are these directories) | ||
# - name: Check Changed Directories | ||
# id: check_changes | ||
# run: | | ||
# changed_directories="${{ github.event.client_payload.changed_dirs }}" | ||
# echo "Changed directories: $changed_directories" | ||
# changes_in_models_or_benchmarks="false" | ||
# if [[ $changed_directories == *"/models"* || $changed_directories == *"/benchmarks"* ]]; then | ||
# changes_in_models_or_benchmarks="true" | ||
# fi | ||
# echo "changes_in_models_or_benchmarks=$changes_in_models_or_benchmarks" >> $GITHUB_ENV | ||
|
||
# # Checkout public repository | ||
# - name: Checkout Public Repository Code | ||
# uses: actions/checkout@v4 | ||
|
||
# # Checkout private repository | ||
# - name: Checkout Private Repository Code | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# repository: 'brains-score/vision_private' | ||
# token: ${{ secrets.PRIVATE_REPO_ACCESS_TOKEN }} | ||
# path: 'private-repo' | ||
|
||
# # Move files from private repo to public repo | ||
# - name: Move Files from Private to Public Repository | ||
# if: env.changes_in_models_or_benchmarks == 'true' | ||
# run: | | ||
# mv private-repo/benchmarks/* vision/benchmarks/ | ||
# mv private-repo/models/* vision/models/ | ||
# mv private-repo/datasets/* vision/datasets/ | ||
|